OpenColorIO icon indicating copy to clipboard operation
OpenColorIO copied to clipboard

FileTransform: load from memory

Open MrKepzie opened this issue 3 years ago • 3 comments

FileTransform currently loads the LUT from a file no matter what. https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/main/src/OpenColorIO/transforms/FileTransform.cpp#L549

This may be useful for applications to wrap LUTs in memory files along with other data. However, this requires currently a copy of the memory blog to a temporary file so that OCIO can read it. Making a "proxy" API such as what OpenImageIO does would enable such use case.

MrKepzie avatar Aug 19 '22 09:08 MrKepzie

I believe @doug-walker and team are currently working on adding this feature to OCIO v2. I shared our private v1 implementation with him as a reference. In our implementation the host can provide a callback so it can provide an istream for assets being read.

SonyDennisAdams avatar Aug 19 '22 17:08 SonyDennisAdams

The ability to source FileTransforms from somewhere other than the file system has been implemented in PR #1696. Please see the ConfigIOProxy class. Any feedback is welcome.

@MrKepzie , it would be interesting to know if the ConfigIOProxy class would work for your use-case.

doug-walker avatar Sep 30 '22 19:09 doug-walker

Thanks for pinging, we'll take a look the next month when possible. For what I've read in the PR description this looks like it fills all the need we have

MrKepzie avatar Sep 30 '22 21:09 MrKepzie

Closing this as fixed via PR #1696.

doug-walker avatar Jan 10 '23 20:01 doug-walker