RV Ocio env vars

Hi there,
With OCIO hitting version 1.1.1 we’re able to pass src and dst colorspace attributes as environment variables to OCIO. This works for us in Nuke.
I’m trying to achieve the same in RV, but I can’t get it to work.
I’ve updated our shotgun_fields mu to retrieve the src and dst colorspace required for each shot.
When I assign the resulting string to the ocio context, I’m getting a weird semi garbled error message in RV.
I’m wondering if there’s an encoding issue when I’m assinging the string to the context variable? I’ve tried both str and unicode but both don’t work.
Can someone confirm if this is a bug or if I’m doing something wrong?

I’m setting the context with :

                                'CDL': _cdl_path,
                                'LUT': _lut_path,
                                'SHOT':_shot,
                                'EPISODE':_episode,
                                'SEQUENCE':_sequence,
                                'CSTSRCSPACE': u'Input - ADX - ADX10',
                                'CSTDESTSPACE': u'ACES - ACEScg', 
                            } 
for k, v in context.iteritems():
    stringProp = pNode + '.ocio_context' + "." + k
    commands.setStringProperty(stringProp, [v], True)

The error looks like this :

Setting : sourceGroup000000_tolinPipeline_0.ocio_context.SHOT : ts_0103_023_030 
Setting : sourceGroup000000_tolinPipeline_0.ocio_context.CSTSRCSPACE : ACES - ACEScg 
ERROR: Exception thrown while calling commands.setStringProperty -- exception: "invalid property name sourceGroup000000_tolinPipeline_0.ocio_context.CSTSRCSPACE", program exception 
Traceback (most recent call last): 
File "/vine/studio/_repos/rv/Python/ocio_source_setup.py", line 891, in maybeUpdateViews 
commands.setStringProperty(stringProp, [v], True) 
EERRROR: OCIOIPRNOR: OCoIdOIeP:N oBuildCodleo: rBuildCoSlorpaScpaecOpes failed, nuOlps failed, lnul ls rscrCcoCloolorrSSppacaec.e 
. 
EERRROR: OCIOIRPONodRe:: O CBuildCIolOoIPrNSopdea:c eBuildCoOlporSsp aceOps failfead, null srcCoileldo, rnuSlpla srccColorSpace.e. 
ERROR: OCIOIPNode: BuildColorSpaceOps failed, null srcColorSpace. 
ERROR: OCIOIPNode: BuildColorSpaceOps failed, null srcColorSpace. 
ERROR: OCIOIPNode: BuildColorSpaceOps failed, null srcColorSpace. 
ERROR: OCIOIPNode: BuildColorSpaceOps failed, 

Any ideas? All the other context env vars are working; specifically the cdl and lut paths.

2 Likes

Hey Patrick,

Thanks for writing in!

This is interesting… Would you mind giving us a short blurb from your OCIO file where you’re defining your context as well? And from your shotgun_fields?

Do you get this error if you set environment variables in command-line and then launch RV? Or do you only get this error when playing RV from Shotgun?

My current thinking is that either the environment variables somehow aren’t propagating into RV from Shotgun or maybe you’re right that there’s a value that RV is expecting from OCIO file that RV isn’t parsing correctly.

Thanks,
Alexa

1 Like

Hi there, just to clear up this thread. I figured out I wasn’t assigning a valid value to the context.

2 Likes