ScriptSpot

Forum topic · General Scripting

Pre and Post render scripts

By ztravnicky · 2009-10-05

Description

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 (1)

Anubis · 2009-10-05

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