add "additionalFlags" field and template parameter for arnold
This commit is contained in:
Родитель
83feccd177
Коммит
dfe2b22c9d
|
@ -51,6 +51,7 @@ class ArnoldRenderJob(AzureBatchRenderJob):
|
|||
self.start = self.display_int("Start frame: ", self.start_frame, edit=True)
|
||||
self.end = self.display_int("End frame: ", self.end_frame, edit=True)
|
||||
self.step = self.display_int("Frame step: ", self.frame_step, edit=True)
|
||||
self.additional_flags_field = self.display_string("Additional flags: ", self.additional_flags, edit=True)
|
||||
|
||||
try:
|
||||
log_level = cmds.getAttr("defaultArnoldRenderOptions.log_verbosity")
|
||||
|
@ -64,6 +65,10 @@ class ArnoldRenderJob(AzureBatchRenderJob):
|
|||
def render_enabled(self):
|
||||
return True
|
||||
|
||||
@property
|
||||
def additional_flags(self):
|
||||
return str_type(" ")
|
||||
|
||||
def get_jobdata(self):
|
||||
if self.scene_name == '':
|
||||
raise ValueError("Current Maya scene has not been saved to disk.")
|
||||
|
@ -95,6 +100,12 @@ class ArnoldRenderJob(AzureBatchRenderJob):
|
|||
params['frameStep'] = cmds.intField(self.step, query=True, value=True)
|
||||
params['renderer'] = self._renderer
|
||||
params['logLevel'] = int(cmds.optionMenu(self.logging, query=True, select=True)) - 1
|
||||
|
||||
#additionalFlags has to default to " " rather than an empty string, in order to be accepted by the template
|
||||
additionalFlagsValue = str_type(cmds.textField(self.additional_flags_field, query=True, text=True))
|
||||
if not additionalFlagsValue:
|
||||
additionalFlagsValue = " "
|
||||
params['additionalFlags'] = additionalFlagsValue
|
||||
return params
|
||||
|
||||
|
||||
|
|
|
@ -79,6 +79,13 @@
|
|||
"metadata": {
|
||||
"description": "SAS URL for input file group with read and list permissions"
|
||||
}
|
||||
},
|
||||
"additionalFlags": {
|
||||
"type": "string",
|
||||
"defaultValue": " ",
|
||||
"metadata": {
|
||||
"description": "Additional flags to pass to the maya executable on the cmd line"
|
||||
}
|
||||
}
|
||||
},
|
||||
"jobPreparationTask": {
|
||||
|
@ -114,7 +121,7 @@
|
|||
],
|
||||
"repeatTask": {
|
||||
"displayName": "Frame {0}",
|
||||
"commandLine": "subst X: \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\\assets\" & \"%MAYA_2017_EXEC%\" -renderer [parameters('renderer')] -proj \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\" -ai:ltc 1 -ai:lve [parameters('logLevel')] -verb -preRender renderPrep -rd \"%AZ_BATCH_TASK_WORKING_DIR%\\images\" -s {0} -e {0} \"[parameters('sceneFile')]\" & call \"%MAYA_2017%\\bin\\mayapy\" \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\\thumbnail.py\" %^errorlevel%",
|
||||
"commandLine": "subst X: \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\\assets\" & \"%MAYA_2017_EXEC%\" -renderer [parameters('renderer')] -proj \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\" -ai:ltc 1 -ai:lve [parameters('logLevel')] [parameters('additionalFlags')] -verb -preRender renderPrep -rd \"%AZ_BATCH_TASK_WORKING_DIR%\\images\" -s {0} -e {0} \"[parameters('sceneFile')]\" & call \"%MAYA_2017%\\bin\\mayapy\" \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\\thumbnail.py\" %^errorlevel%",
|
||||
"environmentSettings": [
|
||||
{
|
||||
"name": "MAYA_SCRIPT_PATH",
|
||||
|
|
|
@ -79,6 +79,13 @@
|
|||
"metadata": {
|
||||
"description": "SAS URL for input file group with read and list permissions"
|
||||
}
|
||||
},
|
||||
"additionalFlags": {
|
||||
"type": "string",
|
||||
"defaultValue": " ",
|
||||
"metadata": {
|
||||
"description": "Additional flags to pass to the maya executable on the cmd line"
|
||||
}
|
||||
}
|
||||
},
|
||||
"jobPreparationTask": {
|
||||
|
@ -114,7 +121,7 @@
|
|||
],
|
||||
"repeatTask": {
|
||||
"displayName": "Frame {0}",
|
||||
"commandLine": "subst X: \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\\assets\" & \"%MAYA_2018_EXEC%\" -renderer [parameters('renderer')] -proj \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\" -ai:ltc 1 -ai:lve [parameters('logLevel')] [parameters('additionalFlags')] -verb -preRender renderPrep -rd \"%AZ_BATCH_TASK_WORKING_DIR%\\images\" -s {0} -e {0} \"[parameters('sceneFile')]\" & call \"C:\\Program Files\\Autodesk\\Maya2018\\bin\\mayapy\" \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\\thumbnail.py\" %^errorlevel%",
|
||||
"commandLine": "mkdir \"%AZ_BATCH_TASK_WORKING_DIR%\\thumbs\" & mkdir \"%AZ_BATCH_TASK_WORKING_DIR%\\images\" & subst X: \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\\assets\" & \"%MAYA_2018_EXEC%\" -renderer [parameters('renderer')] -proj \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\" -ai:ltc 1 -ai:lve [parameters('logLevel')] [parameters('additionalFlags')] -verb -preRender renderPrep -rd \"%AZ_BATCH_TASK_WORKING_DIR%\\images\" -s {0} -e {0} \"[parameters('sceneFile')]\" & call \"C:\\Program Files\\Autodesk\\Maya2018\\bin\\mayapy\" \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\\thumbnail.py\" %^errorlevel%",
|
||||
"environmentSettings": [
|
||||
{
|
||||
"name": "MAYA_SCRIPT_PATH",
|
||||
|
|
Загрузка…
Ссылка в новой задаче