OpenColorIO icon indicating copy to clipboard operation
OpenColorIO copied to clipboard

[RFC] Support for context/environment variables in Roles

Open KevinJW opened this issue 5 years ago • 3 comments

Currently roles act as static aliases, I was wondering what people think to the idea of supporting context variables in place of the colour space destination:

roles:
  show_grade_cs: <Context> { var: SHOW_GRADE_CS }
  existing_syntax: some_colour_space

or some other syntax (I'll explain the <Context> part next ...)

KevinJW avatar Jan 28 '20 10:01 KevinJW

Bump I have the need to do this in order to set the camera raw space based on an environment variable. Are there any alternatives to this?

andranikvfx avatar Aug 31 '20 23:08 andranikvfx

Is that still something being considered? I think it could be useful.

Why not use the simple syntax like we do in ColorSpaceTransform src / dst?

roles:
  show_grade_cs: $SHOW_GRADE_CS
  existing_syntax: some_colour_space

remia avatar Jan 21 '22 12:01 remia

👍 We have recently run into another use case for this.

There is a wide variation of which roles a DCC application with OCIO implementation will use for which purpose. There are times when the role chosen for a specific workflow within the application is questionable. It does not align with other DCC applications' use of that role which is using it correctly, so changing the colourspace assigned to that role in the OCIO config is not an option.

Using context variables, we could override the role through the environment for that specific DCC.

mdecaria avatar Jun 01 '22 10:06 mdecaria