Integrating Krakatoa SR With Deadline
Overview
Krakatoa SR is implemented as a Python module. It uses a Python script as a scene description language and the Python executable as the render executable.
Deadline, the Thinkbox Software Network Render Manager, uses Python for render plugin integration and submission tools development.
It is thus very straight-forward to integrate Krakatoa SR with Deadline.
The following tutorial describes the steps necessary to define a Krakatoa SR plugin in Deadline and create a Krakatoa SR Submission script for the Deadline Monitor application.
It is based to a large extent on the information already available in the Plug-in Scripting topic of the Deadline Documentation.
Creating A Krakatoa SR Plugin
It is not necessary to start from scratch - since Krakatoa SR rendering is a form of a Python script execution, we can simply take the existing Python Plugin, copy it and modify to produce a KrakatoaSR Plugin:
- Navigate to your Deadline Repository share.
- Locate the \plugins folder and look for the Python sub-folder.
- Copy the Python sub-folder and rename it to KrakatoaSR
- Inside the folder, rename all files to "KrakatoaSR", while preserving their extensions.

Modifying the KrakatoaSR.dlinit File
This file is used to initialize the KrakatoaSR plugin.
- Open the file "KrakatoaSR.dlinit"
- Change the About= value to "KrakatoaSR plugin"
- Leave the line ConcurrentTasks=True unchanged - this will allow a single Slave to run multiple copies of Krakatoa SR if requested by the user, given enough render licenses.
- Delete all other lines except KrakatoaSR_Executable_2_6=C:\Python26\python.exe - the current version of Krakatoa SR is compiled as a Python 2.6 Module, so we will have to specify where the Python executable is located to fire up the renderer. In the future, should Krakatoa SR provide Modules compiled for other versions of Python, we could add these to the file as new lines like KrakatoaSR_Executable_2_7=... etc.
- Save the modified file:

Modifying the KrakatoaSR.ico File
- This the the icon file used by the Monitor in the Submit menu and in the Jobs list.
- Using an image editor that supports .ico files, (for example GIMP), open the icon file KrakatoaSR.ico which contains the original Python icon.
- You can open the Krakatoa icon file shipping with the Maya To Krakatoa SR script and resize it from 32x32 to 16x16 pixels, then paste into the KrakatoaSR.ico file, or design your own icon if you are artisticly inclined.
- Save the KrakatoaSR.ico file and close the image editor.
Modifying the KrakatoaSR.param File
- Open the file in a text editor
- Change the first line to [KrakatoaSR_Executable_2_6]
- Change the fourth line to Category=KrakatoaSR Python Executables
- Optionally, change the last line to explain that Python is used to run Krakatoa SR rendering.
- Save the file and close the text editor.

Modifying the KrakatoaSR.py File
This file contains the actual KrakatoaSR plugin definition as a Python Class.
- Open the file in a text editor
- Change the def GetDeadlinePlugin(): method to return KrakatoaSRPlugin()
- Change the class definition to class KrakatoaSRPlugin (DeadlinePlugin):
- Change the exeList line to use "KrakatoaSR_Executable_"
- Add a new function override
def StartupDirectory(self):
scriptFile = GetPluginInfoEntryWithDefault( "ScriptFile", GetDataFilename() )scriptFile = CheckPathMapping( scriptFile )return ChangeFilename( scriptFile, "" )This function will return the path portion of the scene file and set the Startup directory of Python.exe to the Scene folder, thus ensuring that all relative paths to PRT files, OBJ meshes and EXR images will be resolved correctly. - Leave the rest unchanged, save the file and close the editor.
If you would open the Deadline Monitor now and look at the Tools menu > Configure Plugins... menu item while in SuperUser mode, you will see the KrakatoaSR entry and configuration options:

Creating A Krakatoa SR Submission Script
In the second part of the Krakatoa SR integration with Deadline, we will define the Submission Dialog using the Python Submission script as a template. Submission scripts in Deadline are themselves written in Python and, once defined, appear in the Submit menu of the Deadline Monitor.
- On the Deadline Repository share, navigate to the \scripts\submission folder.
- Locate the sub-folder PythonSubmission and copy it.
- Rename the copy to KrakatoaSRSubmission.
- Delete the .ico file, copy the KrakatoaSR.ico file from the Plugins\KrakatoaSR folder and rename it to "KrakatoaSRSubmission.ico"
- In the new folder, rename the .py and .ini files from "PythonSubmission.*" to "KrakatoaSRSubmission.*"
- Leave the name of the file "Tooltips.ini" unchanged.

Modifying the KrakatoaSRSubmission.ini File
This file defines the label shown in the Deadline Monitor menu.
- Open the file in a text editor
- Change the first line to Label=Submit Krakatoa SR Python Scene To Deadline
- Save the file and close the editor.
Modifying the KrakatoaSRSubmission.py File
This Python script file contains the actual submission dialog and the submission code.
Open the file in a text editor, locate the line with the SetTitle() function and change it to
scriptDialog.SetTitle( "Submit Krakatoa SR Python Scene To Deadline" )
Modify the following line to
scriptDialog.SetIcon( Path.Combine( GetRootDirectory(), "scripts/Submission/KrakatoaSRSubmission/KrakatoaSRSubmission.ico" ) )
Locate the "SceneLabel" control definition and change it to
scriptDialog.AddControl( "SceneLabel", "LabelControl", "Scene File", labelWidth, -1 )
Locate the "VersionBox" control definition and change it to
scriptDialog.AddComboControl( "VersionBox", "ComboControl", "2.6", ("2.6"), controlWidth, -1 )
Modify the very next line to
scriptDialog.AddSelectionControl( "SubmitSceneBox", "CheckBoxControl", False, "Submit Scene File With Job", 200, -1 )
A few lines later, modify the tooltips loading function to access the new file:
scriptDialog.LoadTooltips( Path.Combine( GetRootDirectory(), "scripts/Submission/KrakatoaSRSubmission/Tooltips.ini" ) )
Modify the def GetSettingsFileName(): to
return Path.Combine( GetDeadlineSettingsPath(), "KrakatoaSRSettings.ini" )
Modify the job info file definition to
jobInfoFilename = Path.Combine( GetDeadlineTempPath(), "krakatoasr_job_info.job" )
Modify two lines down to
writer.WriteLine( "Plugin=KrakatoaSR" )
Modify the plugin info file definition to
pluginInfoFilename = Path.Combine( GetDeadlineTempPath(), "krakatoasr_plugin_info.job" )
Modifying the visible.ini File
- Go up to the \scripts\Submission folder
- Locate the file visible.ini and open it in a text editor.
- Copy and Paste the line PythonSubmission=True and change it to KrakatoaSRSubmission=True
- Save and close the file.
At this point, opening the Deadline Monitor and looking at the Submit menu should show a new "Submit Krakatoa SR..." entry:

Submitting a Krakatoa SR Job To Deadline
At this point, we are ready to submit a scene to render on Deadline.
Let's assume that the directory structure exported from the 3D application (Maya, Houdini, 3ds Max etc.) was copied to a mapped network location. We will leave the PY scene description script and all related files there and let the Slave call the local python.exe with the remote PY file.
- Select the "Submit Krakatoa SR Python Scene To Deadline" option from the Submit menu of the Deadline Monitor.
- In the dialog, click on the [...] button next to the Scene File test field and pick the PY scene exported from the 3D Application. In the example below, a scene was exported from Maya.

- Enter all relevant information and click the Submit button.
- Close the Submission Successful prompt and then close the Submitter dialog.
- The job should appear in the Deadline Monitor.
- When a slave picks up the job, it will launch Python.exe with the scene description file and produce the final output:

