0

using the 'lutgen' module from python?

Hi,
I've never done any scripting in RV before but thought it might be a good time to start now that python support has been added.
I want to apply some offsets to a log DPX image before the cineon log->lin conversion is being made and figured that the pre-cache LUT is the way to do that.
Searching the 'Mu API Documentation Browser' I found the 'lutgen' module and 'newPreLut' method, however I cant seem to import it in python (rvtypes and commands work fine):

>from rv import lutgen
ImportError: cannot import name lutgen

 

I'm using RV 3.12.12 on Linux64.

 

Cheers

Christoffer

1 comment

  • 0
    Avatar
    Alan Trombla

     

    Hi Christoffer,

    I'm sorry, I looked into this a bit when you posted the question, then forgot to get back to you.  Anyway the news is not encouraging, I'm afraid.  The lutgen module is written in Mu, and the newPreLUT function is not easily bound to Python (because of the functor argument).  So at the moment there's no way to get at newPreLUT from Python.

    On the other hand, the fact that the module is written in Mu means you have the source code, so it should be straightforward to rewrite it in Python.  Let  me know if you're interested in that and I'll try to give you some more specific pointers.

    Cheers,

    Alan

Please sign in to leave a comment.