Re: no function in (Python) API to get colorspace of defined role?


Sean Cooper <se...@...>
 

Not at a computer to verify, but I believe you can just do a getColorspace() call using the user defined or default roles, the query the name of the returned object. Role names are equivalent to color space names. Its a bit obtuse I must admit.


On Mon, 28 May 2018, 3:21 pm Abraham Schneider, <abraham....@...> wrote:
Just had a look in the Python API and wondered how I could get the referenced colorspace of a named role. Some of the roles are predfined as constants (OCIO.Constants.ROLE_...), but what's with user defined roles? So for example the compositing_linear one in the ACES config, or a self defined one?

Shouldn't there be just an easy function like 'getRole(rolename)' that just gives back the name of the colorspace that the role is linking to!?

Really confused at the moment on how to use roles via API.

Thanks!

--
You received this message because you are subscribed to the Google Groups "OpenColorIO Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ocio-dev+u...@....
For more options, visit https://groups.google.com/d/optout.

Join ocio-dev@lists.aswf.io to automatically receive all group messages.