If you’ve been using Deadline for a few years, you’ve likely come across a time when a new version of your Digital Content Creation (DCC) application like Maya or Cinema 4D has been released and your current version of Deadline doesn’t currently support it. Ideally an upgrade will get you official support, but occasionally it may be worth patching in support yourself. This article covers how you can make some quick tweaks to Deadline’s plugins to support a new application version. There’s no guarantee that it will work, but if you’re looking for an excuse to roll up your sleeves and tweak your farm this is a great opportunity.
The error that will usually show up if you try and render with a version that Deadline doesn’t support will read like the following when you view the job report:
Error: RenderPluginException : GetConfigEntry: Attempted to access non-existent config key: RenderExecutable2030_0
at Deadline.Plugins.DeadlinePlugin.GetConfigEntry(String key) (Python.Runtime.PythonException)
File "C:\ProgramData\Thinkbox\Deadline10\workers\YWG-9902945189\plugins\61e068a484d1697c60ee2c8c\MayaBatch.py", line 348, in StartJob
mayaExecutable = self.Process.RenderExecutable()
File "C:\ProgramData\Thinkbox\Deadline10\workers\YWG-9902945189\plugins\61e068a484d1697c60ee2c8c\MayaBatch.py", line 2585, in RenderExecutable
mayaExeList = self.deadlinePlugin.GetConfigEntry( "RenderExecutable" + versionString )
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)
At a high level, this is because the integrated submitter took the application version and dutifully added it to the Plugin Info file at submission time. The plugin is now complaining that it can’t find anything about that specific version!
How Does Deadline Know Which App Version to Load?
There’s an in-depth write-up of this in the Application Plugins section of the documentation, but in short there’s a function called GetRenderExecutable() in each plugin that searches the render node to find which executable to run. Most use a parameter in the plugin info file named “Version” to determine the app version, then look up where to find it in the file system using a default list of executables in the plugin’s “param” file. As mentioned before, our integrated submitters automatically supply the “Version” variable and usually don’t need an update. However, because the Monitor submitters don’t run inside of the application they can’t inspect anything for a version and idea and will need a patch to add it to the UI.
Great, So How Do I Tell the Plugin About A New Version?
We’ll start with the param file since you likely already have a submitted job that’s throwing errors ?
This file provides a number of default settings that Deadline will load in then store in the Database. Note that if you make a typo in the file path you’ll likely need to change it in the plugin configuration instead of this file because it’s only read once when Deadline can’t find the data in the Database.
In our case, we’ll be adding Maya 2030 (purposely a non-existent future version) to the MayaBatch plugin, but this will be applicable to any of the AWS Thinkbox provided plugins. Just make a copy of “[repo]\plugins\MayaBatch\MayaBatch.param” and open the original in a text editor. This will change things on the entire farm so it may be a good idea to install a local Repository/Database on your machine and point a few render nodes to that for testing. Also just a reminder to make a backup of the file!
Scroll around until you see the latest version of your DCC in the list. In this future world of 2029 it will (hopefully) look like this:
[RenderExecutable2029_0]
Type=multilinemultifilename
Category=Render Executables
CategoryOrder=0
Index=99
Label=Maya 2029 Render Executable
Default=C:\Program Files\Autodesk\Maya2029\bin\MayaBatch.exe;C:\Program Files (x86)\Autodesk\Maya2029\bin\MayaBatch.exe;/usr/autodesk/maya2029-x64/bin/maya;/Applications/Autodesk/maya2029/Maya.app/Contents/bin/maya
Description=The path to the Maya 2029 executable file used for rendering. Enter alternative paths on separate lines.
You may notice the “Index=99”. If you’re curious what it does, check the docs.
What we need to do is add a new entry and change three things: The version number, the paths, and the comment to reference the new versions. Also set that index one higher so “Index=100“. It should slide in like this:
[RenderExecutable2029_0]
Type=multilinemultifilename
Category=Render Executables
CategoryOrder=0
Index=99
Label=Maya 2029 Render Executable
Default=C:\Program Files\Autodesk\Maya2029\bin\MayaBatch.exe;/usr/autodesk/maya2029-x64/bin/maya;/Applications/Autodesk/maya2029/Maya.app/Contents/bin/maya
Description=The path to the Maya 2029 executable file used for rendering. Enter alternative paths on separate lines.
[RenderExecutable2030_0]
Type=multilinemultifilename
Category=Render Executables
CategoryOrder=0
Index=100
Label=Maya 2030 Render Executable
Default=C:\Program Files\Autodesk\Maya2030\bin\MayaBatch.exe;/usr/autodesk/maya2030-x64/bin/maya;/Applications/Autodesk/maya2030/Maya.app/Contents/bin/maya
Description=The path to the Maya 2030 executable file used for rendering. Enter alternative paths on separate lines.
Double check your work and save it.
Now, if this somehow went horribly wrong, remember you made that backup file before. Put it back in place and we’re back in business. If the Worker generates an error, it should reload the plugin automatically for you. You can optionally force a reload by having the Worker load a different type of job or restart the Worker remotely. If it went horribly right, you’ll see this in your “Configure Plugins” window:
That should be all that’s needed if you don’t work with the Monitor submitter, but users may not be happy that they can’t pick Maya 2030 there. Let’s do a full fix and make everyone’s lives better.
Hacking Python Code for Monitor Happiness
We’ll shake things up a little bit in the tutorial and switch to Mac for this. The main files that make up the Monitor submitters live in “[repo]/scripts/Submission” (the integrated scripts live in “[repo]/submission/[application name]” if you’re curious). What we need to do is find the line that defines the version and add to it. This might be a little scary if you’re not familiar with Python but just pay close attention to what’s come before and you should be alright.
For Maya, we’re going to be editing “[repo]/scripts/Submission/MayaSubmission.py” so make a backup of that outside of the folder and we can start editing. You can make the backup in the folder, but you’ll end up seeing that in the Monitor if you restart or “reload scripts” in the “Tools” menu.
Now that you have a backup you can open the file in a text editor and find the “VersionBox” parameter. Not every submitter will be written this way and in fact the Maya Monitor submitter has a trick up its sleeve:
You’ll notice here that there is no mention of Maya 2029 at all! Where is it? Well, you can see there’s something called “supported_versions“ in there, and it refers to a variable defined at the top of the file that lists all of the versions supported. I’ve gone and added the 2030 in this screenshot already. Note that the list does not end in a comma and Python is pretty strict with how to write things (as opposed to how we’d talk to each other anyway). In fact, you must make sure the lines start with the correct number of spaces (don’t use tabs or other whitespaces) or your submitter won’t work. In that case, restore from you backup.
Double check your work, save the file, and then go to the Monitor’s menu and select “Submission”, then “3D”, then “Maya”. You’ll see the version picker at the bottom of the Window has gotten one entry longer. Try submitting a known working scene for Maya 2030 and you should be good to go!
What about other plugins? Let’s take a look at Nuke now because it’s a little different. Take a backup of “[repo]/scripts/Submission/NukeSubmission.py” and open it up:
Here you can see that it’s organized a little differently. If you’re a seasoned Python hacker this will hopefully be a comfortable change for you to make, but for others a reminder that the coding is very strict and you’ll need to use the same number of spaces as the previous elements. Quotes matter, and not having a comma at the end matters. In the screenshot above I’ve added 20.0, 20.1 and 20.2.
After the edit, go to the Monitor’s menu and choose “Submission”, then “2D/Compositing”, then “Nuke” and you should have some new versions at your disposal! I’ve picked my new 20.2 here:
And that should be it! If you have trouble or want some advice feel free to cut us a ticket!
Comments
0 comments
Please sign in to leave a comment.