OpenColorIO icon indicating copy to clipboard operation
OpenColorIO copied to clipboard

RFE: ability to load CTF / CLF from a stream

Open zachlewis opened this issue 3 years ago • 2 comments

i.e., similarly to how it's possible to load an OCIO config from a stream -- as in, a string of the xml contents of a CTF / CLF.

To my knowledge, as of now, CTF and CLF have to be serialized to disk and referenced via a FileTransform before they can make their way into a Processor.

zachlewis avatar Mar 07 '22 17:03 zachlewis

I guess if we were to allow that for CLF / CTF, we should go all the way and support that for any FileTransform? In terms of code it's probably going to be the same amount of work I believe.

I can see this as potentially useful yes, curious if you are able to share some use case for this request?

remia avatar Mar 09 '22 21:03 remia

That's a good point, re: support for any FileTransform.

The specific use-case that prompted this ticket pertains to the handling of big-assed XML files containing the contents of multiple CTF / CLF transforms, analogous to how a .ccc file contains one or more CDL color corrections. Specifically, I'm looking at parsing Autodesk SynColor catalogs for transforms and metadata, without having to serialize individual transforms to disk ephemerally for FileTransform's sake.

More generally, an in-memory string representation provides an extremely convenient means for interfacing with / validating external software (example) "for free".

I think your work on making PyOpenColorIO object instances copyable satisfies most of my other use-cases, so thanks for that!

zachlewis avatar Mar 10 '22 21:03 zachlewis