Changing vray settings in a 3dsmaxcmd.exe pre-render script

It seems this does not work even though it pretends to.
I want to set vray settings in a 3dsmaxcmd.exe prerender script to be able to submit some special jobs from outside of max.

As a testcase i have a script that turns off final image, turns on gi, sets gi settings. When i filein that script in the gui everything works as expected.
If i run it as a prerender script i do not get my vrmap saved out.

Now to debug i started writing values to a text file. So for example:

format (renderers.current.options_dontRenderImage as string + “\n”) to:f
renderers.current.options_dontRenderImage = true
format (renderers.current.options_dontRenderImage as string + “\n”) to:f

Doing so showed that it seems the corresponding values are changed. as i can see the before/after difference. It seems the settings are ignore though as i am not ending up with my irrmap.

Any ideas?

Cheers,
Thorsten

Currently V-Ray doesn’t respect any scripts or commands used as a pre-render scripts. This is something that we have to fix for the next release.

Damn. Thanks for the feedback though.

The scripts are actually respected and they do work, but by the time they are executed, V-Ray has already cached its parameters from the parameter blocks. You could write a V-Ray settings plugin to do what you need - these can modify V-Ray’s parameters directly in its SequenceData structure. Or you could put that code in the setupSequenceData() method of a render element if you have one handy.

Best regards,
Vlado

Hm. I could cook that up i guess. But the code is dynamically generated everytime. Is there a call that would cause vray to re-evaluate its parameters there?

Cheers,
Thorsten

Not right now.

Best regards,
Vlado