add "additionalFlags" field and template parameter for arnold

This commit is contained in:
David Kydd 2018-09-20 14:18:41 +12:00
Родитель 83feccd177
Коммит dfe2b22c9d
3 изменённых файлов: 27 добавлений и 2 удалений

Просмотреть файл

@ -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",