I want to ask whether there is a way of telling MAXScript about what scene file is about to get rendered. I need to use the file name in a pre-load script so I can change some of its properties before it gets loaded in Max.
should return the FILENAME of the MAX file submitted with the job. Only the file name (no path) is included in that entry, but you could resolve the path of the script itself and look in the same folder since the MAX file and the MS file would be usually together.
Something like
If the MAX scene file was not submitted with the job but was referenced from a network location, you would have to read it from the job file using
DeadlineUtil.GetJobInfoEntry "SceneFile"
In fact, you might want to test for the latter first and if it is not in the Job Info file, then look for the Aux. Filename.
There might be an easier way to figure that out, but this is how I would hack it if I had to… Please note that I have not tested the above suggestion, let me know if it works or not…
Hi Lukas,
If you could wait till the file is loaded before changing properties? Then things get easier with the Deadline Util struct.
Property Description
string SceneFileName Gets the file name of the loaded 3ds Max scene.
string SceneFilePath Gets the file path of the loaded 3ds Max scene.
Of course, what we all really want is a ASCII based Max file format in the future, just like Maya, but there you go