custom ini issue

hello, I am running on Deadline 7.0.2…3 R currently and I noticed an issue with the auto detect ini feature in the smtd script. The issue is that it works for mental ray and not vray. I am running vary adv 3.0 on max 2014. when I switch to mental ray it works and detects the custom ini in the repo, however if I switch to vray it defaults to [Default] and not the vray ini file. I followed the naming convention in the documentation but it still does not seem to work. Is this a possible bug with deadline 7? Thanks!

-Christian

Interesting that nobody has reported this problem since it might have been broken for a very long time (the original code was written when VRay 1.5 was still the current version, possibly even earlier).

The code checks the first 3 letters of the renderer’s name, and it expected “VRa” but V-Ray Advanced currently produces “V_R”.

To fix this yourself, navigate to your Deadline Repository, go into \submission\3dsmax\main\ and look for the file SubmitMaxToDeadline_Functions.ms.
Open the file in a text editor and find the function SuggestAltIni() somewhere around line 1500 that looks like

"VRa" : for i = 2 to SMTDSettings.theIniFilenames.count do if findstring SMTDSettings.theIniFilenames[i] "vray" != undefined do SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[i]

Change it to

"V_R" : for i = 2 to SMTDSettings.theIniFilenames.count do if findstring SMTDSettings.theIniFilenames[i] "vray" != undefined do SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[i]

Save the file. Restart SMTD and see if it works.

Thanks for the report! We will fix this on our side for 7.1. In fact, I think we will refactor the way the detection is performed as it should probably check the classid of the renderer like we do in other places. As I mentioned, this function is ancient, ca. 2005. It even supports MaxMan (Animal Logic’s RenderMan connection for 3ds Max) and ExLuna’s Entropy that haven’t been around forever :slight_smile:

Hope this helps. Please let me know if it does not.

Who has time to wait for Deadline 7.1? Not me.

Here is the modernized version of the SuggestAltIni() function with support for most current renderers:

		fn SuggestAltIni =
		(
			SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[1] 
			case SMTDFunctions.getRendererIdString() of
			(
				"scanline" : SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[1] 
				"brmax" : for i = 2 to SMTDSettings.theIniFilenames.count where matchPattern SMTDSettings.theIniFilenames[i] pattern:"*brazil*"  do SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[i]
				"finalrender" : for i = 2 to SMTDSettings.theIniFilenames.count where matchPattern SMTDSettings.theIniFilenames[i] pattern:"*fr*" != undefined or matchPattern SMTDSettings.theIniFilenames[i] pattern:"*final*" do SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[i]
				"iray" : for i = 2 to SMTDSettings.theIniFilenames.count where matchPattern SMTDSettings.theIniFilenames[i] pattern:"*iray*" != undefined do SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[i]
				"mentalray" : for i = 2 to SMTDSettings.theIniFilenames.count where matchPattern SMTDSettings.theIniFilenames[i] pattern:"*mr*" or matchPattern SMTDSettings.theIniFilenames[i] pattern:"*mental*"  do SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[i]
				"vray" : for i = 2 to SMTDSettings.theIniFilenames.count where matchPattern SMTDSettings.theIniFilenames[i] pattern:"*vray*" do SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[i]
				"vrayrt" : for i = 2 to SMTDSettings.theIniFilenames.count where matchPattern SMTDSettings.theIniFilenames[i] pattern:"*vrrt*" do SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[i]
				"maxwell" : for i = 2 to SMTDSettings.theIniFilenames.count where matchPattern SMTDSettings.theIniFilenames[i] pattern:"*maxwell*" do SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[i]
				"krakatoa" : for i = 2 to SMTDSettings.theIniFilenames.count where matchPattern SMTDSettings.theIniFilenames[i] pattern:"*krak*" do SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[i]
				"corona" : for i = 2 to SMTDSettings.theIniFilenames.count where matchPattern SMTDSettings.theIniFilenames[i] pattern:"*corona*" do SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[i]
				"quicksilver" : for i = 2 to SMTDSettings.theIniFilenames.count where matchPattern SMTDSettings.theIniFilenames[i] pattern:"*quick*" do SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[i]
				default: SMTDSettings.AltPluginIni = SMTDSettings.theIniFilenames[1]
			)
		),

Just replace the whole function in SubmitMaxToDeadline_Functions.ms, save the file and restart SMTD.
The old file naming rules still apply: the alternative plugin.ini file must start with the token “plugin”, must have extension “.ini” (duh!) and the renderer must be denoted by the signatures listed above as pattern. E.g. “vray” for V-Ray, “vrrt” for V-Ray RT and so on.

What can I say, Bobo! You’re the man! That worked great. All fixed.

Thanks again.

-Christian