3dsmaxbatch plugin?

Ok, here is a super early Alpha WIP use-at-your-own-risk version of the 3dsmaxbatch plugin:

3dsmaxbatch_20210507.zip (14.3 KB) - REMOVED. See here for a new version.

Installation

  • Copy the file SMTDWorkflow_3dsmaxbatch.ms from the ZIP into your (Repo)\submission\3dsmax\Main\Workflows\ folder.
  • Copy the 3dsmaxbatch folder from the ZIP into your (Repo)\plugins\ folder.
  • Start SMTD in 3ds Max 2018.4 or higher - note that the 3dsmaxbatch in 2018 prior to PU4 was different and incompatible. It did not exist prior to 2018, so older 3ds Max versions are not supported at all.

UI:

  • Once the SMTD UI opens, select the new “Submit 3DSMAXBATCH Job To Deadline” Workflow.
  • The 3dsMaxBatch: Script And Scene rollout contains three major areas:
    • The Batch Script File is mandatory. This is the script that will be run by 3dsmaxbatch.exe. It can be MAXScript or Python, and can do anything that can be done in 3ds Max. It will be sent as the first auxiliary file of the Job, so it can be located on a local drive or network share - either way a copy of it will be sent to the Repository.

      • You must use the […] button to pick a file, you cannot edit the text in the field.
    • The Scene File is optional. Radio buttons let you select one of the following options:

      • Submit Current Scene will save a copy of the scene according to the setting of the Assets tab > Scene and Asset Files rollout - either copied as the second auxiliary file with the job, or will be referenced via SceneFile= in the Plugin params.

      • Submit External .MAX File will use a scene file from disk. It will also respect the Assets tab > Scene and Asset Files rollout settings and will be either copied as the second auxiliary file with the job, or will be referenced via SceneFile= in the Plugin params.

        • The path is displayed only when the second radio button is checked.
        • You must use the […] button to pick a valid file, you cannot edit the path manually.
        • The file can be modified via the Job Properties > 3dsmaxbatch Settings dialog.
      • No Scene - Create In Script will launch an empty 3dsMax scene. No scene file will be sent with the Job. It is up to you to generate content using the script.

      • In all 3 cases, the script can save the modified scene to any network path as part of the job.

    • Listener Log Path - This is optional and lets you specify a folder where each Task will write the script Listener Log file. The name of the log will look like mxslog_(jobName)_(TaskID).log, for example “mxslog_3dsmaxbatchtest_1.log” if the Job was called “3dsmaxbatchtest” and this was Task 1. If you re-render the same Task multiple times, old logs will be overwritten. If you don’t specify a path, the Listener output will not be captured. You can use print() and format() calls in your script to write to the Listener.

  • The 3dsMaxBatch: Custom Values rollout lets you define 10 custom strings and 10 custom values. They are all optional and can be used to pass data to the script via the command line arguments of 3dsmaxbatch.
    • The strings can contain anything except for quotation marks (double-quotes will be replaced with single quotes when entering), and the values can contain any MAXScript values like numbers, transform matrices, Point3 values etc.

  • They can be accessed from the Job’s script using maxOps.mxsCmdLineArgs[#CustomStringN] and maxOps.mxsCmdLineArgs[#CustomValueN] where N is an integer from 0 to 9. For example if you enter “Bobo was here” in the Custom String 0 field and submit a job, your script can do print maxOps.mxsCmdLineArgs[#CustomString0] and you will see “Bobo was here” in the Listener Log.

  • The strings and values are exposed to the Job Properties > 3dsmaxbatch Settings panel and can be changed after submission to modify how the script behaves.

  • The rest of the SMTD rollouts have been reduced to only the controls that make sense.

I am sure there are a lot of bugs in the current version. Please report them in this thread!

1 Like