184 строки
4.9 KiB
JSON
184 строки
4.9 KiB
JSON
{
|
|
"templateMetadata": {
|
|
"description": "Application template for working with Maya on Windows."
|
|
},
|
|
"parameters": {
|
|
"sceneFile": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "The Maya scene file to be rendered"
|
|
}
|
|
},
|
|
"renderer": {
|
|
"type": "string",
|
|
"defaultValue": "sw",
|
|
"metadata": {
|
|
"description": "The Maya renderer to be used for the render"
|
|
},
|
|
"allowedValues": [
|
|
"sw"
|
|
]
|
|
},
|
|
"projectData": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "The file group where the input data is stored"
|
|
}
|
|
},
|
|
"assetScript": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "The SAS URL to a pre-render asset path redirection script"
|
|
}
|
|
},
|
|
"thumbScript": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "The SAS URL to the thumbnail generation script"
|
|
}
|
|
},
|
|
"workspace": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "The SAS URL to the project workspace"
|
|
}
|
|
},
|
|
"frameStart": {
|
|
"type": "int",
|
|
"metadata": {
|
|
"description": "Index of the first frame to render"
|
|
}
|
|
},
|
|
"frameStep": {
|
|
"type": "int",
|
|
"metadata": {
|
|
"description": "Incremental step in frame sequeunce"
|
|
}
|
|
},
|
|
"frameEnd": {
|
|
"type": "int",
|
|
"metadata": {
|
|
"description": "Index of the last frame to render"
|
|
}
|
|
},
|
|
"outputs": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "The file group where outputs will be stored"
|
|
}
|
|
},
|
|
"storageURL": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "SAS URL for input file group with read and list permissions"
|
|
}
|
|
},
|
|
"taskContainerImageName": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "The Container image name to execute each task within"
|
|
}
|
|
}
|
|
},
|
|
"jobPreparationTask": {
|
|
"userIdentity": {
|
|
"autoUser": {
|
|
"elevationLevel": "admin"
|
|
}
|
|
},
|
|
"resourceFiles": [
|
|
{
|
|
"blobSource": "[parameters('assetScript')]",
|
|
"filePath": "scripts\\renderPrep.mel"
|
|
},
|
|
{
|
|
"blobSource": "[parameters('thumbScript')]",
|
|
"filePath": "thumbnail.py"
|
|
},
|
|
{
|
|
"blobSource": "[parameters('workspace')]",
|
|
"filePath": "workspace.mel"
|
|
}
|
|
],
|
|
"commandLine": "azcopy /source:\"[parameters('storageURL')]\" /dest:\"%AZ_BATCH_JOB_PREP_WORKING_DIR%\\assets\" /S"
|
|
},
|
|
"taskFactory": {
|
|
"type": "parametricSweep",
|
|
"parameterSets": [
|
|
{
|
|
"start": "[parameters('frameStart')]",
|
|
"end": "[parameters('frameEnd')]",
|
|
"step": "[parameters('frameStep')]"
|
|
}
|
|
],
|
|
"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%\" -verb -preRender renderPrep -rd \"%AZ_BATCH_TASK_WORKING_DIR%\\images\" -s {0} -e {0} \"[parameters('sceneFile')]\" & call \"%MAYA_2018%\\bin\\mayapy\" \"%AZ_BATCH_JOB_PREP_WORKING_DIR%\\thumbnail.py\" %^errorlevel%",
|
|
"environmentSettings": [
|
|
{
|
|
"name": "MAYA_SCRIPT_PATH",
|
|
"value": "%AZ_BATCH_JOB_PREP_WORKING_DIR%\\scripts"
|
|
},
|
|
{
|
|
"name": "FLEXLM_TIMEOUT",
|
|
"value": "5000000"
|
|
}
|
|
],
|
|
"outputFiles": [
|
|
{
|
|
"filePattern": "images/**/*",
|
|
"destination": {
|
|
"autoStorage": {
|
|
"fileGroup": "[parameters('outputs')]"
|
|
}
|
|
},
|
|
"uploadOptions": {
|
|
"uploadCondition": "taskSuccess"
|
|
}
|
|
},
|
|
{
|
|
"filePattern": "thumbs/*.png",
|
|
"destination": {
|
|
"autoStorage": {
|
|
"fileGroup": "[parameters('outputs')]",
|
|
"path": "thumbs"
|
|
}
|
|
},
|
|
"uploadOptions": {
|
|
"uploadCondition": "taskSuccess"
|
|
}
|
|
},
|
|
{
|
|
"filePattern": "../stdout.txt",
|
|
"destination": {
|
|
"autoStorage": {
|
|
"fileGroup": "[parameters('outputs')]",
|
|
"path": "logs/frame_{0}.log"
|
|
}
|
|
},
|
|
"uploadOptions": {
|
|
"uploadCondition": "taskCompletion"
|
|
}
|
|
},
|
|
{
|
|
"filePattern": "../stderr.txt",
|
|
"destination": {
|
|
"autoStorage": {
|
|
"fileGroup": "[parameters('outputs')]",
|
|
"path": "logs/frame_{0}_error.log"
|
|
}
|
|
},
|
|
"uploadOptions": {
|
|
"uploadCondition": "taskCompletion"
|
|
}
|
|
}
|
|
],
|
|
"containerSettings": {
|
|
"imageName": "[parameters('taskContainerImageName')]",
|
|
"containerRunOptions": "--privileged"
|
|
}
|
|
}
|
|
},
|
|
"onAllTasksComplete": "terminateJob"
|
|
}
|