Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Support for the OpenColorIO Python bindings in Maya

Support for the OpenColorIO Python bindings in Maya

# Use case

As a Pipeline Developer supporting color management workflows across multiple DCCs, it would be great if I could rely on using the OpenColorIO Python bindings from within Maya in order to perform basic query related to the OCIO config currently in use.

Right now Nuke, Houdini and RV all ship those bindings, make it easier for pipeline code that is only called inside those DCCs to call the OCIO API from Python. While for Maya, despite internally supporting OCIO, a separate installation of the PyOpenColorIO package is needed in order to perform those same calls. This adds to the maintenance burden for pipeline teams, especially since the OCIO bindings are not abi3 compatible and as such one needs to carefully ensure that the external PyOpenColorIO bindings one could install would match the specific interpreter version used by Maya (and that the ABIs of Maya and the external OCIO library are compatible).

# Technical details

Right now, trying this import in Nuke would succeed :
>>> import PyOpenColorIO as OCIO >>> OCIO.__file__ '/Applications/Foundry/nuke/15.0v1/Nuke15.0v1.app/Contents/MacOS/plugins/PyOpenColorIO.so'


Same for Houdini:
>>> import PyOpenColorIO as OCIO
>>> OCIO.__file__
'/Applications/SideFX/houdini/20.0.547-py310/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyOpenColorIO.so'

While in Maya 2024.2 it would error :
>>> import PyOpenColorIO as OCIO Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'PyOpenColorIO'

This is confirmed by looking on disk at what ships with every DCC:

$ find /Applications -type f -name 'PyOpenColorIO.so' /Applications/Foundry/nuke/13.0v4/Nuke13.0v4.app/Contents/MacOS/plugins/PyOpenColorIO.so /Applications/Foundry/nuke/15.0v4/Nuke15.0v4.app/Contents/MacOS/plugins/PyOpenColorIO.so /Applications/Foundry/nuke/14.0v2/Nuke14.0v2.app/Contents/MacOS/plugins/PyOpenColorIO.so /Applications/Foundry/nuke/13.2v2/Nuke13.2v2.app/Contents/MacOS/plugins/PyOpenColorIO.so /Applications/Foundry/nuke/15.0v1/Nuke15.0v1.app/Contents/MacOS/plugins/PyOpenColorIO.so /Applications/RV.app/Contents/python3/lib/python3.7/lib-dynload/PyOpenColorIO.so /Applications/RV.app/Contents/python2/lib/python2.7/lib-dynload/PyOpenColorIO.so /Applications/SideFX/houdini/20.0.547-py310/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyOpenColorIO.so

Thanks!

Valerio

1 Comment
kareembukshbuksh3
Community Visitor

Thepackagespk.com 

Great question! While you're exploring solutions for OpenColorIO Python bindings in Maya, you might find some helpful resources or insights on this site, which offers tools and packages related to various DCCs and workflows. It could help streamline your pipeline development further.

Good luck with your work!"

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report