Here we have added another parameter MaxFileName
and modified InputFile
such that, upon recieving input zip, it will be unzipped into workingFolder
MaxFileName
parameter reads the file from unzipped folder
this argument sematic explains that \"$(args[InputZip].path)/$(args[MaxFileName].value)\"
$(args[myParam1].path)
for a given parameter with the key "myParam1", this will be replaced by the file path where the file got uploaded/downloaded to. If the parameter is a zip, it will be replaced by the path to the folder where the zip got unzipped.
$(args[myStringParam].value)
will be replaced by the string value provided at work item submission of the parameter with the key "myStringParam" (Only for argument using the read
verb).
Possible values of verb -get, head, put, post, patch, read
{
"id": "{{activityId}}",
"commandLine": "$(engine.path)/3dsmaxbatch.exe -sceneFile \"$(args[InputZip].path)/$(args[MaxFileName].value)\" \"$(settings[script].path)\"",
"description": "Export a single max file to FBX",
"appbundles": [
"{{nickname}}.{{appId}}+{{appAlias}}"
],
"engine": "{{engineId}}",
"parameters": {
"InputFile": {
"zip": true,
"description": "Zip file containing the max file and all its dependencies to be unziped in the workingFolder",
"ondemand": false,
"required": true,
"verb": "get",
"localName": "workingFolder"
},
"MaxFileName" : {
"zip": false,
"description": "Name of the max file in the zip file provided as InputZip parameter",
"ondemand": false,
"required": true,
"verb": "read"
},
"OutputFile": {
"zip": false,
"ondemand": false,
"verb": "put",
"description": "Output bmp file",
"required": true,
"localName": "output.bmp"
}
},
"settings": {
"script": "exportFile (sysInfo.currentdir + \"/output.bmp\") #noPrompt using:FBXEXP"
}
}
Note we have assigned a value [name of max file] to MaxFileName
argument
{
"activityId": "{{forgeAppNickname}}.{{activityId}}+{{alias}}",
"arguments": {
"MaxFileName": "inputs.max",
"InputZip": {
"url": "{{zipFileSignedUrl}}",
"verb": "get"
},
"OutputZip": {
"url": "{{outputFileSignedUrl}}",
"verb": "put"
}
}
}