AcademySoftwareFoundation / OpenColorIO

A color management framework for visual effects and animation.
https://opencolorio.org
BSD 3-Clause "New" or "Revised" License
1.79k stars 454 forks source link

[RFC] Support for context/environment variables in Roles #916

Open KevinJW opened 4 years ago

KevinJW commented 4 years ago

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 part next ...)

andranikvfx commented 4 years ago

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?

remia commented 2 years ago

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
mdecaria commented 2 years ago

👍 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.