Selecting cccid from .ccc file (applying LUT)


#1

Hi all,

I am trying to apply an open color file (.ccc) to my draft conversion in the following way:

lut = Draft.LUT.CreateOCIOProcessorFromFile(lut_file)
frame.Apply(lut)

However i get the following error:

STDOUT: lut = Draft.LUT.CreateOCIOProcessorFromFile(lut_file)
2018-06-14 10:30:50: 0: STDOUT: RuntimeError: You must specify which cccid to load from the ccc file (either by name or index).

What’s the correct way of specifying the cccid? All my ccc files have only one cccid in them so selecting index 0 would work,
though I can’t find the argument for that. :neutral_face:

Thank you in advance,

George


#2

I did a little digging, and that error isn’t from Draft but from OpenColorIO:
github.com/imageworks/OpenColor … L.cpp#L172

It looks like we need to add a new function for this which allows you to pass in a value. We’ll need to add setCCCId() during the internal load of the LUT… The dev team might take awhile here, and I wonder if there’s a way to convert the ccc profile to something else?


#3

Thanks for looking into this,
yes it would be good if there was a function for this,

I initially managed to get it working by using

CreateASCCDL((object)slope, (object)offset, (object)power[, (float)saturation=1])

and extracting the values from the .ccc file (by reading it as an xml)

But after speaking with support they suggested using:

[code]import DraftASCCDLReader

lut = DraftASCCDLReader.ReadASCCDL(r"/path/to/test.ccc")

[/code]

This works if there’s only one cccid in each .ccc file.

Hope this helps!


#4

Today I learned DraftASCCDLReader is a thing. Good job team mates!