Re: PyOpenColorIO Constants change from version 1 to 2

Rajiv Perseedoss

Ah I see.
Thanks Mark for the information. Much appreciated.


On Thu, 30 Jun 2022 at 10:52, Mark Titchener <mark.titchener@...> wrote:
Hi Rajiv,

I believe this was an intentional change and I think it was done as part of this commit

There are functions to set/get the the major/minor version of the config e.g. getMajorVersion()

You can find more info here:

Hope this helps!


On Thu, 30 Jun 2022 at 10:14, rajiv.perseedoss via <> wrote:
Hi all,
I've come across an issue with PyOpenColorIO where the constants seem to have been restructured from OCIO 1 to 2 and I can't seem to find any documentation or any mention of this in the changelog. This is the issue:
import PyOpenColorIO as OCIO

# OCIO 1

# OCIO 2
All the roles from Constants are now moved. Is that true or am I missing something here?
If this has indeed changed from OCIO 1 to 2, is there any way for me to detect the OCIO version through python and put some sort of guard, so that my script could still be backward compatible? i.e., something like this?
import PyOpenColorIO as OCIO

if "OCIO_VERSION" < 2:


Mark Titchener

Principal Product Designer

Tel: +44 (0)20 7479 4350


The Foundry Visionmongers Ltd.  -  Registered in England and Wales No: 4642027  -  Address: 5 Golden Square, London, W1F 9HT  -  VAT No: 945701320

Join { to automatically receive all group messages.