I’m trying to run a little script preframe to workaround a mentalray bug. All it does is change the environment texture filtering to something else and back again…
I get the following error when the tasks try to render:
0: INFO: Executing script: C:\Users\render\AppData\Local\Prime Focus\Deadline\slave\jobsData\MR_Env_Fix.ms
Scheduler Thread - Render Thread 0 threw an error:
Scheduler Thread - Exception during render: An error occurred in RenderTasks(): RenderTask: Unexpected exception (Maxscript exception:-- Unable to convert: 1 to type: String
The scripts run fine when I execute them in max - just not at rendertime.
Looking at the error message, I would say that MAX is throwing this in slave mode, so it might not be a Deadline bug (but I could be wrong).
When you execute this locally, Max is running in workstation mode, so certain things that are possible to do there might not be possible in network mode.
Also, when you tested it locally, did you run that script as a PreFrame callback at render time, or did you just evaluate it manually? That would make a big difference because PreFrame callbacks cannot modify the scene - only PreRender callbacks can.
It would be useful to know if the same error message is thrown if you check the “Workstation Mode” option in the Submit To Deadline dialog. In that case, Max will be launched with full UI (and will require a license) on the slave machine and behave like a local workstation copy.
If it still happens and you haven’t tried running a PreFrame callback with this code on the local machine, try that. If it still happens outside of Deadline, it is either an Autodesk bug, a mental images bug, or just some “Known” Limitation we don’t know about.
If it still looks like it is Deadline causing the problem, we will try to figure it out…