OCIO.zip (976 Bytes)
I’m trying to develop a custom event plugin to set up an environment variable, following the explanation here - Event Plugins — Deadline 10.3.2.1 documentation - and I’m not seeing any of the logfile messages that I think I should be seeing.
I’ve created the custom/events/OCIOEnvVar folder, and put OCIOEnvVar.py and OCIOEnvVar.param in it.
I can see the OCIOEnvVar event in the Deadline Monitor dialog.
When I run a job - a Maya 2023 job that calls Arnold for rendering - I don’t see any of the messages that I’ve put into the OCIOEnvVar.py file in the log file.
I’ve put the .py and .param files into the attached ZIP file.
What do I need to do to ensure that this script executes when the job is submitted? Thanks.
Although you can use an event plugin to set OCIO, there is another way that will be simpler for these purposes, and that is JobPreLoad.py or PluginPreLoad.py respective their global equivalents GlobalJobPreLoad.py and GlobalPluginPreLoad.py described here
Events logs are living just in the same place as normal logs having “EventLog” in the column Title. Make sure your event is enabled in the “Configure Event” window. Also check console if there isn’t any error related to your event.
It appears, though, that the MayaBatch code is setting a number of environment variables, and maybe it’s not evaluating <MAYA_RESOURCES> correctly?
I’m setting the MAYA_RESOURCES environment variable in the GlobalPluginPreLoad.py file, and can see in the log file that this is done.
Problem is, when MayaBatch.py gets run, it’s seeing what is set in Maya - in Preferences → Color Management, I have “Enable Color Management” checked, and the following as the value of “OCIO Config Path”: <MAYA_RESOURCES>/OCIO-configs/Maya2022-default/config.ocio
That string shows up in the render job’s log file:
Setting OCIO environment variable to <MAYA_RESOURCES>/OCIO-configs/Maya2022-default/config.ocio for this session
Setting Process Environment Variable OCIO to <MAYA_RESOURCES>/OCIO-configs/Maya2022-default/config.ocio
but then Arnold throws an error:
ERROR | [color_manager_ocio] could not read '<MAYA_RESOURCES>/OCIO-configs/Maya2022-default/config.ocio' OCIO profile.