3dsMax bat trouble


#1

Hi sorry if this has been covered, but I couldn’t find anything specific to 3dsmax.

I want to run Vray from a central location. I have the Plugin.ini setup and everything working when I specify the environment variables for the Job.

I would like to set these globally rather than messing with scripts to modify the submit info file every time.

Everything I have read points to running max with a .bat to set the env vars (If there is a better way please let me know) this works fine when I

run the .bat but doesn’t seem to work when I point deadlines max executable to the bat file. I have set the bitness to none.

Error: “/runMax.bat” does not have a valid DOS signature value, so is not a PE or not a dll/exe

Any help on how to set this up correctly would be appreciated.

Cheers


#2

Change the bitness of Max you want to ‘none’ in the submitter. Batch files don’t have a PE header so Deadline gets kinda grumpy about it.


#3

Thanks for the reply, I have already set the Build type to none, It was this first thing I tried.


#4

The “3dsmax” plugin currently expects “3dsmax.exe” to be passed to it. Quite a bit of plugin code would currently break if that was not the case. Environment Variables could be automatically injected into ALL your 3dsMax jobs at submission time via an OnJobSubmitted callback and also stored globally in the event plugin for future editing pipeline wide.


#5

Hello,

We stumble uppon this issue too.
We do need to have our own code to execute 3dsMax because we are dealing with params our own way.

Are you planning to let users execute cmd/bat files for 3dsMax plugin ?

Thanks


#6

Can you clarify what kind of things you need to set in your bat file? Is it simply ENV VARs or is there anything else?

Supporting a wrapper script for 3dsMax will be somewhat tricky and most likely very specific to just this plugin and the 3dsCmd plugin and possibly the V-Ray one.

Do you use wrapper scripts to launch all your different apps? If so, what apps and do you need anything else apart from setting ENV VARs?

I want to understand your use case more.


#7

Hello Mike, thanks for the response.

The bat file is lauching our wrapper wich deals with custom parameters.
We do need these mechanism because 3dsMax does not allow to pass a python script AND parameters.
We store params in the wrapper, launch max with a custom startup script, and then execute our python script wih the params.
If there are any unknown params they are still passed to max.

So what we did is just commenting the Is64BitDllOrExe method, set our bat file as the executable and everything is now running.

I guess it’s ok as long as we don’t use the -p directly wich would override your call and as long as we have our own way to execute a python file.
So it should be stated somewhere that -p and the max startup file are locked by the plugin.

I hope its more clear for you know.