AWS Thinkbox Discussion Forums

Maya2022/2023/2024 vray 6.1 renderout in deadline different from local render

I met this problem for a long time.final i found maya2022 ocio path is “<MAYA_RESOURCES>/OCIO-configs/Maya2022-default/config.ocio” When i set “C:\Program Files\Autodesk\Maya2022\resources\OCIO-configs\Maya2022-default/config.ocio” render out will be OK.But every job i have to change the ocio path when i submitt to deadline(some job i will be forget). I guess smone know how to set deadline to slove this promble.(maya 2023 2024 with the same question)

You can set an environment variable through and OnJobSubmission event for the job to look for OCIO path.

You will need to write an event plugin which will fire up at the time the job is submitted. It will set OCIO path on the job as an environment variable. The script file will be something like below please tweak as required. Also make the .param file yourself. Look at the docs on how to write it here: Event Plugins — Deadline 10.3.0.13 documentation

###############################################################
# Imports
###############################################################
from System import *

from Deadline.Events import *
from Deadline.Scripting import *

import os
import string
#########################################################################################
# This is the function called by Deadline to get an instance of the Draft event listener.
#########################################################################################


def GetDeadlineEventListener():
    return CustomEnvironmentCopyListener()


def CleanupDeadlineEventListener(eventListener):
    eventListener.Cleanup()

###############################################################
# The event listener class.
###############################################################

class EnvironmentCopyListener (DeadlineEventListener):
	def __init__(self):
	    self.OnJobSubmittedCallback += self.OnJobSubmitted
	
	def Cleanup(self):
	    del self.OnJobSubmittedCallback
	
	def OnJobSubmitted(self, job):
		key = "OCIO"
		variable = "C:\Program Files\Autodesk\Maya2022\resources\OCIO-configs\Maya2022-default/config.ocio"
	
		# Set chosen variable to job
		self.LogInfo("Setting %s to %s" % (key, variable))
		job.SetJobEnvironmentKeyValue(key, variable)
	
		RepositoryUtils.SaveJob(job)
	
		self.LogInfo("On Job Submitted Event Plugin: OCIO Environment Finished")
1 Like
Privacy | Site terms | Cookie preferences