AWS Thinkbox Discussion Forums

Code for the opencolor lut from file?

Heya Folks!

I’m trying to get the open color file lut working using the following:

[code]
– in my draft ui

if scriptDialog.GetValue( “DestColorComboBox” ) == “From Lut”:
args.append( 'LutFile="%s" ’ % os.path.abspath(scriptDialog.GetValue( “LutBox” )) )

– and in my draft script

LutFile = Draft.LUT.CreateOCIOProcessor( params[‘LutFile’] )[/code]

and I’m getting this error from draft:

0: STDOUT: Trying to use a custom lut 0: STDOUT: Traceback (most recent call last): 0: STDOUT: File "P:\Screen_Scene_VFX\Nicktime\JohnDev_MOV_MJPEG_1080p_Slate_&_Burnin.py", line 169, in <module> 0: STDOUT: LutFile = Draft.LUT.CreateOCIOProcessor( theLut ) 0: STDOUT: Boost.Python.ArgumentError: Python argument types in 0: STDOUT: LUT.CreateOCIOProcessor(str) 0: STDOUT: did not match C++ signature: 0: STDOUT: CreateOCIOProcessor(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > colorSpaceIn, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > colorSpaceOut) 0: STDOUT: Output #0, mov, to '\\192.168.0.250\VFX_Project\Screen_Scene_VFX\Nicktime\lut_test\frank_1801_v000.mov':

If I’m using a custom lut and not the built in ocio conversion types do I need to still initialize a configuration for ocio or should this single line be enough if I’m applying a lut file?

If you’re using a LUT file, you want to use LutFile = Draft.LUT.CreateOCIOProcessorFromFile( params['LutFile'] ) (Note the “FromFile” added to the method name.)

Reminder: documentation of the new parts of the API can be found at: http://forums.thinkboxsoftware.com/viewtopic.php?f=125&t=12111

If you’re providing the full path to the LUT file, then initializing the OCIO configuration should be optional.

Cheers,
Andrea

Ah stupid me!

In the lut from file section of the new documentation I coped the text without reading it - it’s got CreateOCIOProcessor in the code window instead of CreateOCIOProcessorFromFile as you’ve mentioned here. Working perfectly now, much appreciated and that’s what I get for pretending to be a programmer :smiley:

Whoops, thanks for catching that! My bad! I’ll fix that right away.

High fives.

Privacy | Site terms | Cookie preferences