AWS Thinkbox Discussion Forums

SMTDSettings Pool Bug

Found a small issue with our own custom submitter code.

Normally any setting we set in the SMTDSetting struct will then get picked up by the submit functions we piggyback on from SMTD_Functions.

However if I set the PoolName property, Deadline will always get this from the INI file instead. There’s an easy fix to set the INI file instead, but I just found it strange that it behaves this way.

You can see this fairly easily without our custom submitter code…

Open the SMTD window… set a pool.

Close the window…
Type:
SMTDSettings.poolName = “one of your other pools”

Now open the SMTD window again. It’ll still be the original one.

bug fix is to this…
SMTDSettings.poolName = “one of your other pools”
setIniSetting (GetDir #plugcfg + “\SubmitMaxToDeadline.ini”) “JobSettings” “Poolname” SMTDSettings.PoolName

And then it’ll work… but like I say this is the only SMTDSetting I’ve seen behave this way so far (probably Pool2Name too).

From my quick look, it seems like you can call displayPoolsList() to sync up the UI’s pool selection from what’s set in STMDSettings as a temporary workaround.

Also, updateControls() will sync all controls back from what’s in SMTDSettings. An interesting thing to note here is that there’s a space where there shouldn’t be, and I’m not well versed enough in MaxScript to know if that’s changes the call to instead returning the value of displayPoolsList and ():

			if SMTDSettings.Pools.count == 0 do SMTDFunctions.CollectPools()
			displayPoolsList ()
			
			if SMTDSettings.Groups.count == 0 do SMTDFunctions.CollectGroups()
			displayGroupsList()

Since you already have a test script, would you be willing to adjust SubmitMaxToDeadline.ms and see if that solves your issue?

I am sure you are aware of the fact that in SMTD prior to v10, each SMTDSetting has many possible behaviors. To see what the behavior is, you can open the Tools>Defaults and Sticky Settings Browser.

By default, the PoolName property is set to Sticky via Global INI file, factory default is “none”, the global default is “”, and the local sticky default will be the value last written to the INI file when the user perused the UI. In this case, the final value that ends up in the SMTDSettings.poolName when SMTD is reopened will be the last value written to the INI file.

Of course, all these behaviors can be controlled via the Deadline Repository INI files. However, if you set a value in SMTDSettings yourself, and then relaunch SMTD, all settings will be reset to factory defaults first, and then the INI settings if needed. So I am not sure why you believe the PoolName is the only one behaving differently, I believe the steps “set any SMTDSettings property to a custom value, then restart SMTD” should reset your custom values…

In SMTD v10 though, we finally implemented what you asked for years ago - sticky settings via the .MAX scene file. So the above behavior applies only to new .MAX scenes that do not have any stored SMTD values. Thus, the final value after reopening SMTD would depend on either what is in the INI file if the scene has never been used with SMTD, or on what is stored in the .MAX file from the last session. The SMTD Settings are stored with the .MAX file whenever the scene is saved. There is a new INI file to control which of the SMTD Settings should NOT be loaded from the .MAX file, in addition to a hard-coded list for some settings. If you want to know more about this new mechanism, please let me know.

Cool Bobo, this is useful!

Josh.

I am currently updating the Deadline 10 docs with a topic discussing (and displaying as a flowchart) the logic behind the Defaults, Sticky Settings, and MAX Scene Settings. I assume the update will be online in the very near future…

Privacy | Site terms | Cookie preferences