my custom submit script :
try
(
local du = DeadlineUtil --this is the interface exposed by the Lightning Plug-in which provides communication between Deadline and 3ds Max
if du == undefined do --if the script is not being run on Deadline (for testing purposes),
(
struct DeadlineUtilStruct --define a stand-in struct with the same methods as the Lightning plug-in
(
fn SetTitle title = ( format "Title: %\n" title ),
fn SetProgress percent = (true),
fn FailRender msg = ( throw msg ),
--For "Job Info Parameters" (as displayed in Monitor -> job -> job properties > Submission Params)
--Please consult the Scripting API reference online -> Deadline.Jobs.Job Class Reference
--http://docs.thinkboxsoftware.com/products/deadline/8.0/2_Scripting%20Reference/class_deadline_1_1_jobs_1_1_job.html#properties
--All of our job properties can be accessed here and are prefixed with "Job" such as:
--fn GetSubmitInfoEntry( "JobSubmitMachine" ), --for "MachineName="
fn GetSubmitInfoEntry key = ( undefined ),
fn GetSubmitInfoEntryElementCount key = ( 0 ),
fn GetSubmitInfoEntryElement index key = ( undefined ),
--For "Plugin Info Parameters" (as displayed in Monitor -> job -> job properties > Submission Params)
--Please consult the displayed Key=Value pairs in the "Plugin Info Parameters" in Monitor such as:
--fn GetJobInfoEntry( "MaxVersion" ), --for "MaxVersion=2017"
fn GetJobInfoEntry key = ( undefined ),
fn GetAuxFilename index = ( undefined ),
fn GetOutputFilename index = ( undefined ),
fn LogMessage msg = ( format "INFO: %\n" msg ),
fn WarnMessage msg = ( format "WARNING: %\n" msg ),
CurrentFrame = ((sliderTime as string) as integer),
CurrentTask = ( -1 ),
SceneFileName = ( maxFilePath + maxFileName ),
SceneFilePath = ( maxFilePath ),
JobsDataFolder = ( "" ),
PluginsFolder = ( "" )
)
du = DeadlineUtilStruct() --create an instance of the stand-in struct
)--end if
du.SetTitle "MAXScript Job" --set the job title
du.LogMessage "Starting MAXScript Job..." --output a message to the log
local st = timestamp() --get the current system time
--YOUR SCENE PROCESSING CODE GOES HERE
----- start processing
(
global SMTDSettings
global SMTDFunctions
local theNetworkRoot = "X:\\TOOLS\\DEADLINE"
local remoteScript = theNetworkRoot + @"\submission\3dsmax\main\SubmitMaxToDeadline_Functions.ms"
local localScript = getDir #userscripts + "\\SubmitMaxToDeadline_Functions.ms"
if doesFileExist remoteScript do
(
if SMTDFunctions == undefined do
(
deleteFile localScript
copyFile remoteScript localScript
fileIn localScript
)
SMTDFunctions.loadSettings()
SMTDSettings.JobName = maxFileName
SMTDSettings.Comment = "Automaticaly Sent by MaxScript"
SMTDSettings.Priority = 50
SMTDSettings.ChunkSize = 10
SMTDSettings.SubmitAsMXSJob = false
SMTDSettings.LocalRendering = false
SMTDSettings.SubmitSceneMode = #reposave --#reposave, #networksave, #globalnetworksave, #networksaveanduse, #networkremap
SMTDSettings.MaxVersionToForce = "none"
SMTDSettings.RunPreFrameScript = false
SMTDSettings.PreFrameScriptFile = "X:\\_BANK\\SCRIPTS\\Script_Max\\DEADLINE_Scripts\\prescript_test02.ms"
local MAXScriptFile = "X:\\_BANK\\SCRIPTS\\Script_Max\\DEADLINE_Scripts\\renderfarm_submission_v02-03.ms"
local maxFileToSubmit = "X:\\_BANK\\SCRIPTS\\Script_Max\\DEADLINE_Scripts\\" + maxFileName
SMTDFunctions.SaveMaxFileCopy maxFileToSubmit
local SubmitInfoFile = SMTDPaths.tempdir + "max_submit_info.job"
local JobInfoFile = SMTDPaths.tempdir+ "max_job_info.job"
SMTDFunctions.CreateSubmitInfoFile SubmitInfoFile
SMTDFunctions.CreateJobInfoFile JobInfoFile
local initialArgs = "\""+SubmitInfoFile+"\" \""+JobInfoFile+"\" \""+maxFileToSubmit +"\" \""+MAXScriptFile +"\" \""+"X:\\_BANK\\SCRIPTS\\Script_Max\\DEADLINE_Scripts\\prescript_test02.ms" +"\" "
local result = SMTDFunctions.waitForCommandToComplete initialArgs SMTDSettings.TimeoutSubmission
local renderMsg = SMTDFunctions.getRenderMessage()
SMTDFunctions.getJobIDFromMessage renderMsg
if result == #success then
(
format "Submitted successfully as Job %.\n\n%\n\n" \
SMTDSettings.DeadlineSubmissionLastJobID renderMsg
)
else
format "Job Submission FAILED.\n\n%" renderMsg
)
)
---- end processing
du.LogMessage ("Finished MAXScript Job in "+ ((timestamp() - st)/1000.0) as string + " sec.") --output the job duration
true --return true if the task has finished successfully, return false to fail the task.
)--end script
catch
(
if ((maxVersion())[1]/1000 as integer) >= 19 then --Max2017 or later only
(
if hasCurrentExceptionStackTrace() then
(
local stackTrace = getCurrentExceptionStackTrace()
stackTrace = filterString stackTrace "\n"
for line in stackTrace do
(
if DeadlineUtil == undefined then (format "WARNING: %\n" line) else DeadlineUtil.WarnMessage(line)
)
)
)
throw()
)
the error i’m getting :
=======================================================
Error
=======================================================
Error: FailRenderException : RenderTask: Unexpected exception (ExecuteMaxScriptFile: Script did not return success. Returned value was: success.
2022/11/18 17:16:04 DBG: [05048] [15128] Starting network
2022/11/18 17:16:04 INF: [05048] [15128] Application started with secure mode state 'OFF'
2022/11/18 17:16:04 INF: [05048] [15128] Product version: 3ds Max 2020.3.4 Security Fix (22.3.4.3408)
2022/11/18 17:16:04 DBG: [05048] [15128] ADP Initialize: Done
2022/11/18 17:16:04 INF: [05048] [15128] Data collection and use is 'ON'. Change your participation anytime in the Help menu of 3ds Max.
2022/11/18 17:16:06 DBG: [05048] [15128] Could not find the specified file in DefaultSettingsParser::parse()
2022/11/18 17:16:17 DBG: [05048] [15128] Graphics driver requested by the user : Nitrous
2022/11/18 17:16:17 DBG: [05048] [15128] Graphics driver actually created in the viewports : null driver
2022/11/18 17:16:20 INF: [05048] [15128] Autodesk 3ds Max Security Tools is active via configuration settings
2022/11/18 17:16:20 INF: [05048] [15128] ALC Security Tool 1.0 loaded. (c:\program files\autodesk\3ds max 2020\applicationplugins\securitytools\contents\scripts\ALC_SecurityTool.ms)
2022/11/18 17:16:21 INF: [05048] [15128] CRP Security Tool 1.0 loaded. (c:\program files\autodesk\3ds max 2020\applicationplugins\securitytools\contents\scripts\CRP_SecurityTool.ms)
2022/11/18 17:16:21 INF: [05048] [15128] ADSL Security Tool 1.0 loaded. (c:\program files\autodesk\3ds max 2020\applicationplugins\securitytools\contents\scripts\ADSL_SecurityTool.ms)
2022/11/18 17:16:30 DBG: [05048] [15128] Starting network
2022/11/18 17:16:31 DBG: [05048] [15128] Calling NetRenderPreLoad
2022/11/18 17:16:31 DBG: [05048] [15128] in NetWorkerPreLoad. jobFile: ; jobname: C:\ProgramData\Thinkbox\Deadline10\workers\rendernode02\jobsData\6377af2682db076024719fc1\maxStartup\0\deadlineStartupMax2020.max
2022/11/18 17:16:31 DBG: [05048] [15128] in Init. jobFile: ; jobname: C:\ProgramData\Thinkbox\Deadline10\workers\rendernode02\jobsData\6377af2682db076024719fc1\maxStartup\0\deadlineStartupMax2020.max
2022/11/18 17:16:31 DBG: [05048] [15128] in Init. calling nrGetIface. jobToSend: C:\ProgramData\Thinkbox\Deadline10\workers\rendernode02\jobsData\6377af2682db076024719fc1\maxStartup\0\deadlineStartupMax2020.max
2022/11/18 17:16:31 DBG: [05048] [15128] in NetWorkerPreLoad. curJobname: C:\ProgramData\Thinkbox\Deadline10\workers\rendernode02\jobsData\6377af2682db076024719fc1\maxStartup\0\deadlineStartupMax2020.max; init: 0
2022/11/18 17:16:31 DBG: [05048] [15128] in NetWorkerPreLoad. calling PostInitMessageSystem()
2022/11/18 17:16:31 DBG: [05048] [15128] in NetWorkerPreLoad. srv_pid: 0
2022/11/18 17:16:31 DBG: [05048] [15128] leaving NetWorkerPreLoad. LoadLib()
2022/11/18 17:16:31 DBG: [05048] [15128] NetRenderPreLoad passed
2022/11/18 17:16:31 DBG: [05048] [15128] Graphics driver requested by the user : Nitrous
2022/11/18 17:16:31 DBG: [05048] [15128] Graphics driver actually created in the viewports : null driver
2022/11/18 17:16:31 DBG: [05048] [15128] Graphics driver requested by the user : Nitrous
2022/11/18 17:16:31 DBG: [05048] [15128] Graphics driver actually created in the viewports : null driver
2022/11/18 17:16:32 DBG: [05048] [15128] Graphics driver requested by the user : Nitrous
2022/11/18 17:16:32 DBG: [05048] [15128] Graphics driver actually created in the viewports : null driver
2022/11/18 17:16:32 INF: [05048] [15128] SYSTEM: Production renderer is changed to Scanline Renderer. Previous messages are cleared.
2022/11/18 17:16:43 DBG: [05048] [15128] Interface8::LoadFromFile(C:\ProgramData\Thinkbox\Deadline10\workers\rendernode02\jobsData\6377af2682db076024719fc1\maxStartup\0\deadlineStartupMax2020.max)
2022/11/18 17:16:43 INF: [05048] [15128] Starting to load file: C:\ProgramData\Thinkbox\Deadline10\workers\rendernode02\jobsData\6377af2682db076024719fc1\maxStartup\0\deadlineStartupMax2020.max
2022/11/18 17:16:44 DBG: [05048] [15128] WARNING: The Populate data is missing on your system.
2022/11/18 17:16:44 INF: [05048] [15128] Done loading file: C:\ProgramData\Thinkbox\Deadline10\workers\rendernode02\jobsData\6377af2682db076024719fc1\maxStartup\0\deadlineStartupMax2020.max
2022/11/18 17:16:44 DBG: [05048] [15128] Interface8::LoadFromFile(C:/ProgramData/Thinkbox/Deadline10/workers/rendernode02/jobsData/6377af2682db076024719fc1/CORONA_French BulldogTESTPEDEL.max)
2022/11/18 17:16:44 INF: [05048] [15128] Starting to load file: C:/ProgramData/Thinkbox/Deadline10/workers/rendernode02/jobsData/6377af2682db076024719fc1/CORONA_French BulldogTESTPEDEL.max
2022/11/18 17:16:45 INF: [05048] [15128] CORONA: Corona is up and running. Corona version: 8, netrender mode: on, slave mode: off, quiet mode: on, Max gamma (display/input/output): 2,2/2,2/2,2
2022/11/18 17:16:45 INF: [05048] [15128] Done loading file: C:/ProgramData/Thinkbox/Deadline10/workers/rendernode02/jobsData/6377af2682db076024719fc1/CORONA_French BulldogTESTPEDEL.max
2022/11/18 17:16:45 INF: [05048] [15128] SYSTEM: Production renderer is changed to Corona 8. Previous messages are cleared.
)
at Deadline.Plugins.DeadlinePlugin.FailRender(String message) (Python.Runtime.PythonException)
File "C:\ProgramData\Thinkbox\Deadline10\workers\rendernode02\plugins\6377af2682db076024719fc1\3dsmax.py", line 173, in StartJob
self.MyMaxController.StartMaxJob()
File "C:\ProgramData\Thinkbox\Deadline10\workers\rendernode02\plugins\6377af2682db076024719fc1\3dsmax.py", line 1595, in StartMaxJob
self.ExecuteMaxScriptFile(self.PostLoadScript)
File "C:\ProgramData\Thinkbox\Deadline10\workers\rendernode02\plugins\6377af2682db076024719fc1\3dsmax.py", line 2894, in ExecuteMaxScriptFile
returnedMessage = self.PollUntilComplete(useTimeout, timeout)
File "C:\ProgramData\Thinkbox\Deadline10\workers\rendernode02\plugins\6377af2682db076024719fc1\3dsmax.py", line 3000, in PollUntilComplete
self.Plugin.FailRender("RenderTask: Unexpected exception (%s)" % e.Message)
at Python.Runtime.Dispatcher.Dispatch(ArrayList args)
at __FranticX_GenericDelegate0Dispatcher.Invoke()
at Deadline.Plugins.DeadlinePlugin.StartJob()
at Deadline.Plugins.DeadlinePlugin.DoStartJob()
at Deadline.Plugins.PluginWrapper.StartJob(String& outMessage, AbortLevel& abortLevel)
at Deadline.Plugins.PluginWrapper.StartJob(String& outMessage, AbortLevel& abortLevel)
=======================================================
Type
=======================================================
RenderPluginException
=======================================================