Hey Ashish,
Thank you for messaging us!
If you take a look at the Starting With OCIO guide, there’s a starter script called rv_ocio_setup_sample.py
. If you download it, you can see how to set context per-node.
For example, setting up the Look pipe group:
elif (nodeType == "RVLookPipelineGroup"):
# If our config has a Look named shot_specific_look and uses the
# environment/context variable "$SHOT" to locate any required
# files on disk, then this is what that would likely look like
result = [
{"nodeType" : "OCIOLook",
"context" : {"SHOT" : os.environ.get("SHOT","def123")}
"properties" : {
"ocio.function" : "look",
"ocio.inColorSpace" : OCIO.Constants.ROLE_SCENE_LINEAR,
"ocio_look.look" : "shot_specific_look"}}]
Note that context here is grabbed from the environment variable that is set:
"context" : {"SHOT" : os.environ.get("SHOT","def123")}
However, instead of the environment variable, you can set up a function to parse your metadata and set the context.
Hope this makes sense!
Thanks,
Alexa