Also checking the ‘max_job_info.job’ file I do not see any mention of the setting for RunPostFrameScript
but there is one for PostFrameScript
PostFrameScript=invert shadow.ms
Looks like the full path of the script is not in the setting for PostFrameScript.
If I manually set PostFrameScript to
PostFrameScript=“O:\Max Scripts\Utilities\Images-Files\invert shadow.ms” in the ‘max_job_info.job’ file and requeue, it does render the frame and the post frame script is run and the result is correct.
Are you using a custom submission script that uses the smtdsettings struct to collect the properties? If so, specifying the RunPostFrameScript and PostFrameScriptFile is halfway there. The other half requires that you specify the .ms script as an auxiliary file when submitting the job to Deadline. So for example, you may have this command already:
Actually wrote MXS for submitting through MXS years ago. Now I’m adding a post render script for image processing. Here’s a portion of my submission script
The post frame script will do an image inversion once the initial image is rendered.
I was looking for the SMTDsettings struct member signalling an auxilary file.
This additional file would have to be manually specified, as shown in my previous post. I’m assuming your custom maxscript is already building up the command line itself, is that correct? If so, then all you should have to do is include the path to the maxscript file as the last argument in the command and you should be good to go.
I am submitting to deadline using the MXS as in my previous reply, not building up for ‘deadlinecommand’ command.
From what I think I understand to be the equivalent in MXS using smtdsettings struct I have set
while my_result != #success do
(
my_result = smtdfunctions.submitjob()
)
I checked that function in the SubmitMaxToDeadline_Functions.ms file, and discovered that this function doesn’t add additional auxiliary files to the command line. Here is the contents of this function:
fn SubmitJob createJobInfo:true createSubmitInfo:true timeout:3600 =
(
SMTDSettings.DeadlineSubmissionSuccessful = false
SMTDSettings.DeadlineSubmissionLastJobID = "failed"
renderSceneDialog.Commit()
try(SMTD_TilesRendering.chk_showRegionGizmo.changed (SMTD_TilesRendering.chk_showRegionGizmo.state = false))catch()
local TempMaxFile = ""
if( SMTDSettings.SubmitScene ) then
(
TempMaxFile = SMTDPaths.TempDir + maxFileName
if maxFileName == "" do TempMaxFile += "untitled.max"
if (doesFileExist TempMaxFile) do deleteFile TempMaxFile
result = SMTDFunctions.SaveMaxFileCopy TempMaxFile
if result != undefined do return result
)
else
(
if maxFileName == "" then
(
filename = getMAXSaveFileName()
if filename == undefined do return ""
TempMaxFile = filename
)
else
TempMaxFile = maxFilePath + maxFileName
saveMaxFile TempMaxFile
)
local initialArgs = ""
if SMTDSettings.bgSubmission do initialArgs += "-background -notify "
if SMTDSettings.dropSubmission do initialArgs += "-drop "
if createSubmitInfo do
if ((SMTDFunctions.CreateSubmitInfoFile SMTDPaths.SubmitInfofile) != true) do return #SubmitInfoFileCreationFailed
if createJobInfo do
if ((SMTDFunctions.CreateJobInfoFile SMTDPaths.JobInfofile) != true) do return #JobInfoFileCreationFailed
if not doesFileExist SMTDPaths.SubmitInfofile do return #SubmitInfoFileMissing
if not doesFileExist SMTDPaths.JobInfofile do return #JobInfoFileMissing
if( SMTDSettings.SubmitScene ) then
initialArgs += "\"" + SMTDPaths.SubmitInfofile + "\" \"" + SMTDPaths.JobInfofile + "\" \"" + TempMaxFile + "\" "
else
initialArgs += "\"" + SMTDPaths.SubmitInfofile + "\" \"" + SMTDPaths.JobInfofile + "\" "
if SMTDSettings.SubmitAsMXSJob do initialArgs += "\"" + SMTDSettings.MAXScriptFile + "\" "
local retCode = SMTDFunctions.waitForCommandToComplete initialArgs timeout
SMTD_LastMessage = SMTDFunctions.getRenderMessage()
if retCode == #success then
(
SMTDSettings.DeadlineSubmissionSuccessful = true
SMTDFunctions.getJobIDFromMessage SMTD_LastMessage
SMTDFunctions.CopyExternalFilesToRepository() --try to copy external bitmaps
SMTDFunctions.SubmitTransferJob() -- submits a remote transfer job if necessary
try(FF_AssetTracker_Functions.TrackDeadlineRender SMTDSettings.DeadlineSubmissionLastJobID)catch()
)
retCode
)
You could probably just recreate this function in your maxscript, and then tweak it to add the required maxscript to the command line arguments.
Cheers,
- Ryan
I should note that I grabbed this code from the latest version of Deadline. Since you’re still using Deadline 3, you may want to grab this code yourself from SubmitMaxToDeadline_Functions.ms in \your\repository\submission\3dsmax.