I was given the task of writing a few scripts using maxscript to automate some render based tasks.

Maxscript

Maxscript is a scripting language for 3DS Max. It helps you to automate tasks and provide UI for them.

The challenge

One of the scripts I have to write involved in writing a post render script using Autodesk Backburner to save multiple render channels to a path given using user input (choosen using the standard file dialog). The post render script contained saving all render channels using vfbcontrol() However, the method requires the path of the rendered output to be passed as an argument. The problems are

  • The post render script call for backburner requires the absolute path to the script file.
  • There can be multiple renders happening at a point in time.

The Jugaad

  • Write a pre-render script which generates the post render script with the file path (One more level and it will become inception).
  • Store the post render script in the same directory as the render output

The jugaad was done to meet some pressing deadlines. If you think there is a better approach, I would be really thankful if you can tell me about it.