Pre and Post render scripts

Hi everybody!

playing little bit with scripts for rendering process... I do not understand the syntax, how to set the Pre-Render and Post-Render script files to "Render Setup Dialog" by scipt.
Help says:
preRendScript (system String): ""
Get/set the file name of the Pre-Render script.

I couldn't find how to load any file. Could somebody post some example, please?

Thanks a lot

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anubis's picture

Yes, this is really badly

Yes, this is really badly explained in the MXS Reference.
Also if do this test:

apropos "preRendScript"
-- result:
preRendScript (system String): ""
usePreRendScript (system BooleanClass): false
localPreRendScript (system BooleanClass): false

You will find a hidden function localPreRendScript which is not described in the Reference :> So, if your pre-render is saved in "C:\test.ms", there is an example usage:

if renderSceneDialog.isOpen() do renderSceneDialog.close() -- close dialog if it open
preRendScript = "C:\\test.ms" -- assign .MS file
usePreRendScript = true -- enable the script

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.