Managing 3ds Max Submitter Defaults
The integrated 3ds Max To Deadline Submitter ("Submit Max To Deadline", a.k.a. SMTD) is arguably the most complex submission tool shipping with the product. The reason for this is that Deadline was originally developed as an in-house network management solution at Frantic Films, a visual effects studio where 3ds Max was the backbone of the production pipeline. A large number of additional features were requested by the artists and implemented in the SMTD toolset, making it very powerful but at the same time very complex.
It had to be acknowledged that every studio using Deadline with 3ds Max and even every single artist submitting jobs to Deadline has a unique work style and particular preferences regarding the default values shown in the SMTD User Interface. To accommodate these requirements for flexiblility, a sophisticated system to control custom default values and sticky settings had to be implemented.
The following tutorial discusses these controls and their practical use in the 3ds Max to Deadline submission workflow.
INTRODUCTION TO SMTD DEFAULTS
As explained already in the Custom MAXScript Submission tutorial, the SMTD utility was implemented as a library of functions performing the steps involved in the preparation and submission of the job to Deadline, and a User Interface exposing these functions to the end user. A third script, the SMTD launcher MacroScript, is installed in the 3ds Max user interface and when executed, resolves the location of the Deadline Repository, locates the functions and UI script sources and synchronizes them to the local workstation. This implies that modifying the function or UI script sources on the Repository will propagate the changes to all workstations used to submit jobs.
To separate the Function Libraries and User Interface, the actual submission settings are stored in a MAXScript struct called SMTDSettings. As demonstrated in the above-mentioned tutorial, loading the functions source creates this struct in memory and initializes all values used by the submission functions, like PoolName, Priority, MachineLimit and so on. To see the full list of these properties, you can launch SMTD via the Submit To Deadline MacroScript and then type in the MAXScript Listener
Inside the file SubmitMaxToDeadline_Functions.ms where the SMTDSettings struct is declared, each property is pre-defined to a factory default value. For example, the SMTDSettings.Priority property defaults to 50 in these factory settings. Thus, loading this source file will initialize all properties used in the SMTD UI and Functions to values that were considered useful by the developers of the tool.
Sticky Vs. Non-Sticky Settings
Obviously, some of these factory defaults wouldn't be very useful in everyday's production practice. Without a way to remember the last used values between SMTD sessions, the artist would have to modify all submission settings every time he opened the tool to submit a new job! To avoid this, the concept of sticky values was implemented in SMTD. All NON-sticky settings values are marked by an asterisk * in the User Interface. The sticky settings are thus the ones that do NOT have an asterisk next to their name.
For example, after a default installation of Deadline, the "Frames:" spinner next to the "Render Task Chunk Size (Frames Per Task)" line does not have an asterisk and is thus sticky, while the checkbox "Task Timeout *" does and is not sticky.
As result, setting the Frames spinner to a value of 10, then closing SMTD and opening it again will preserve the new value between sessions, while checking the Task Timeout will only persist during the current session - closing SMTD and launching it again will reset it to its default unchecked state!
The sticky settings store their values on the local workstation in the \plugcfg folder of 3ds Max, which makes them User-Defined values. This means that every artist can have his own submission preferences which are completely independent from the settings of any other artist using the same network and Deadline installation. These settings have the highest priority and override the factory defaults hard-coded in the SMTDSettings struct.
To determine the location of the sticky settings INI file, launch SMTD and then type in the MAXScript Listener
Non-Sticky Settings - Global Default Values
A property that was defined as non-sticky will be initialized to its factory default and appear in the SMTD UI with that value. But this implies that in order to provide a different factory default for any non-sticky setting, a studio would have to modify the source code declaring the SMTDSettings stuct. This would be a Bad Idea because these changes would be lost each time a new update of Deadline gets installed. To avoid this, an external file called SubmitMaxToDeadline_Defaults.ini located in the \submission\3dsmax folder of the Deadline Repository is employed to store the studio's preferences. This file is only created by the Deadline installer once if it does not exist yet. It is never overwritten if it already exists during updates!
The content of the file has the formatting of a regular INI file with categories in square brackets matching the various rollouts and tabs of the SMTD User Interface. The definitions consist of key=value pairs with the left-hand side matching the name of the SMTDSettings property, and the right-hand side providing the default value. For example,
[JobSettings] JobName= Comment=$default Department= PoolName=3dsmax PoolExclusive=true LimitEnabled=false MachineLimit=1 Priority=50 ChunkSize=1 OutOfOrderMethod=nth OutOfOrderStep=2 SequentialJob=false RenderFramesPreviewJob=false PreviewJobFrameCount=5 PreviewJobPriorityOffset=5 SubmitVisibleObjectsOnly=false SubmitAsSuspended=false AutoDelete=false OnComplete=Nothing MaxVersionToForce=64bit MaxVersionToForceSticky=false TaskTimeoutEnabled=false TaskTimeout=3601 AutoTaskTimeout=false RestartMax=false
The values in this file will overwrite the values hard-coded in the factory defaults of the SMTDSettings stuct definition without the need to modify the file SubmitMaxToDeadline_Functions.ms. If a property is NOT listed in the INI file, it will not be modified, leaving it at its factory default. If the property turns out to be non-sticky, that value will appear in the SMTD UI.
Using this global INI file, a Technical Director or Render Wrangler can implement company-wide defaults for non-sticky settings. For example, if it is determined that the Auto Task Timeout option should be checked for ALL 3ds Max jobs submitted to Deadline, instead of asking every artist to check the option every time they submit a job, a supervisor can simply open the SubmitMaxToDeadline_Defaults.ini file in the Repository, change the line AutoTaskTimeout=false to AutoTaskTimeout=true and save the file. Since AutoTaskTimeout is non-sticky by default, all SMTD sessions will now have this option checked automagically!
Defining Value Stickiness
So how does SMTD "know" which properties are sticky and which not? Other than the default values, the SubmitMaxToDeadline_Functions.ms source does not provide any factory defaults regarding stickiness of properties - it is assumed that ALL properties are sticky unless defined otherwise via an external file called SubmitMaxToDeadline_StickySettings.ini.
The file is also located in the \submission\3dsmax folder and is loaded in a very particular manner:
- If a property name is NOT found in the file, or the file cannot be found, the property is assumed sticky (factory default)
- If a property name is found in the file and its value is the all-lower-case string false, the settings is set to not-sticky and is subject to all the factory, global and local user defaults discussed above.
- If a property name is found in the file and its value is anything else but lower-case false, the property will be assumed sticky.
In other words,
[JobSettings] AutoTaskTimeout=false RestartMax=true
will make AutoTaskTimeout a non-sticky property subject of global and local defaults and RestartMax a sticky setting subject to local sticky settings, but
[JobSettings] AutoTaskTimeout=False RestartMax=TRUE
will make both sticky because anything other than "false" produces a result of true and makes the property sticky. Similarly, setting the RestartMax= property to no value at all or omitting it from the file completely will sill keep it sticky.
The default content of the file lists most properties with either true or false values to allow for easy switching of any property without the need to figure out what the correct name would be. Thus, it is advisable to simply set properties to true when switching them instead of deleting them from the file completely despite the fact that both approaches would lead to the same short term result! In the long term, you want to be able to set a property to false again without having to hunt for its exact name in script source files.
Local Stickiness Definitions
The above system for providing company-wide defaults allows for macro-management of those settings that are not sticky between submission sessions. This is great for simplifying the life of artists who have better things to do than thinking about dozens of submission options each time they have to send a job to render, but it can be a pain for power users who want to customize their SMTD experience beyond the globals dictated by the Repository.
To allow Power Users to override the global stickiness settings, SMTD also supports an optional version of the SubmitMaxToDeadline_StickySettings.ini file stored on the local workstation in the user's profile folders. Since the path varies between users, Deadline versions and Operating Systems, the best way to determine its location is to launch SMTD once, then type in the MAXScript Listener
The output on a Windows 7 workstation running Deadline 5 will look something like
Note that this folder will NOT contain an INI file by default - it has to be copied from the Repository manually and modified to provide only those properties that should be overridden.
It is important to note that logging off and logging in as a different user will change the above path, thus making the local changes really personal. The actual sticky setting values are also stored in the 3ds Max plugcfg folder and are thus stored per-user if 3ds Max was set to use local profiles (which is the default behavior due to the write limitations of the Program Files folders on Windows Vista and Windows 7).
The local SubmitMaxToDeadline_StickySettings.ini file can contain only a sub-set of the stickiness definitions found in the global file. Thus, it is an override of the override. If a property is not found in the local file, its global stickiness will be preserved. If a property is found in the file and the value is exactly lower-case false, the property will not be sticky and will be subject to factory and global defaults. If the property is found and its value is anything else but false, the property will be assumed sticky and will be set to its last known value stored in the 3ds Max plugcfg folder.
For example, let's take the property AutoTaskTimeout once again. As every property, it starts up as sticky until the global stickiness definition file is read and the line AutoTaskTimeout=false is found in the [JobSettings] category. But if a local sticky settings INI file is found in the user profile and contains a definition AutoTaskTimeout=true (or anything else but AutoTaskTimeout=false), the setting will be set back to sticky despite the company-wide policies that control the Auto Task Timeout defaults globally.
- every property starts with a factory default hard-coded by the Thinkbox developers in the file SubmitMaxToDeadline_Functions.ms;
- then its name is searched for in the global defaults file SubmitMaxToDeadline_StickySettings.ini located in the \submission\3dsmax folder on the Repository and if found and set to false, it will be defined as a non-sticky;
- then its name is searched for in the local profile file SubmitMaxToDeadline_StickySerttings.ini located at the path stored in the SMTDPaths.SettingsDir property and if found and set to something else than false, it will become sticky again;
- If the property has been determined to be non-sticky, its name will be searched for in the file SubmitMaxToDeadine_Defaults.ini located in the \submission\3dsmax folder on the Repository and if found there, its value will be set to the value defined in the INI file. If not found, the factory value will be preserved.
- If the property has been determined to be sticky, its value will be retrieved from the local settings file stored in the 3ds Max \plugcfg folder. If that property is not found in that file, the factory default will be used.
USING THE DEFAULTS AND STICKY SETTINGS - AN EXAMPLE
Now that we have a solid understanding of the logic behind global and local defaults and global and local stickiness controls, let's try to modify the SMTD UI to behave differently from its initial installation settings.
Let's assume that a company is using Deadline on a project where the render time of a single frame is very short compared to the start up time of 3ds Max, but priorities are jiggled constantly, causing render nodes to pick up and drop jobs very often. This would result in significant 3ds Max start up time overhead as a slave would have to reload the application each time it returns to a job to render a frame. In this situation, using a Task Size greater than 1 is advisable. If the render time per frame is around one minute and the startup time of 3ds Max is also around a minute, rendering 10 frames in a single chunk means that a single machine will need around 11 minutes to finish 10 frames. With Task Size of 1, if the machine is constantly pulled by other jobs with higher priority after each frame, it could take up to 20 minutes of combined startup and render time to produce the same 10 frames.
In this situation, a supervisor might make the decision to enforce a 10 frames per task chunk size for the duration of the project. In a small company with a few artists, it could be enough to ask each one to set the Task Chunk Size to 10 once - it is a sticky setting and would remain at that value until changed again. But in a larger company with a hundred artists, it would be much easier to modify the INI files in the Repository to make the Task Chunk Size a non-sticky property and enforce its default value to 10.
SMTD Factory Defaults
After a clean install of Deadline the SMTD 5.0 User Interface will show the Task Chunk Size "Frames:" value is sticky and set to 2. It was initially 1 and was modified locally and is sticking to the new value now:
Modifying The Stickiness Globally
Now let's change the stickiness of the Task Chunk Size property using the global INI file in the Repository. To do so,
- Open a Windows Explorer and navigate to the location of the Deadline Repository
- Go into the \submission\3dsmax folder of the Repository
- Locate the file SubmitMaxToDeadline_StickySettings.ini and open it in a text editor like Notepad
- Locate the line ChunkSize=true under the [JobSettings] category
- Edit the line to read ChunkSize=false
- Save the file to disk and close it.
- In 3ds Max, restart SMTD
RESULT: The Task Chunk Size "Frames:*" value now has an asterisk next to it's caption, which according to the text just above the submission buttons means it is now not sticky!
Since the Task Chunk Size value is now non-sticky, it is subject to factory and defaults definitions. The default shipping value is 1, so switching stickiness off causes the previously sticky value of 2 to change to the global default of 1.
Modifying the Global Default Value
Now let's set the global value of this property to 10. To do so,
- Locate the file SubmitMaxToDeadline_Defaults.ini in the same directory as the previous INI file.
- Open the file in an editor like Notepad.
- Locate the line ChunkSize=1 and change it to ChunkSize=10
- Save the file to disk and close it.
- In 3ds Max, restart SMTD
RESULT: The Frames:* value now has a default value of 10 after a new start of SMTD as desired.
Local Stickiness Override
Now let's assume you are a Power User and don't want to use the global settings dictated by the supervisor's changes. Let's assume you want your Task Size to be sticky regardless of what everyone else in the office is using.
To do so,
- Launch SMTD once to initialize all properties and functions.
- Open a new MAXScript Editor and, being a Power User, type in the following code:
theSource = SMTDPaths.NetworkRoot+"\\submission\\3dsmax\\SubmitMaxToDeadline_StickySettings.ini" theTarget = SMTDPaths.SettingsDir + "SubmitMaxToDeadline_StickySettings.ini" copyFile theSource theTarget
- Press Ctrl+E to evaluate - the MAXScript Listener will show the results of the 3 lines - if the Defaults file does not exist in the local profile, the result of the third line will be true which means the copying succeeded.
- Running the script a second time should always produce false in the third line because MAXScript does not allow the overwriting of files when copying them. false means the file exists already.
- Now type in the Listener
RESULT: The local copy of SubmitMaxToDeadline_StickySettings.ini will open in the MAXScript Editor.
- You can delete all lines except for the [JobSettings] category and ChunkSize=false if you don't want to affect any other global defaults except for the Frames per task value.
- Edit the line to read ChunkSize=true
- Save the file to disk.
- Restart SMTD
RESULT: The Frames: value does not show an asterisk* anymore because it is now sticky again, and its value will be the last sticky value stored locally!
The Submit Max To Deadline tool provides a highly sophisticalted system for controlling the default values displayed in the SMTD UI at startup. While it is possible to modify each and every value manually before or some even after the submission, providing reasonable defaults via global or local overrides and controlling which settings are sticky (and this user-controlled) and which are provided as company-wide presets can significantly improve productivity in larger facilities.