Vray Resets when being accessed by Maxscript

I am working on a small script to automate Flythrough Animations for Vray.

Unfortunately Vray Settings sometimes tend to rest to default when testing the script, but I could not find the bug. Furtheron I could not retrace the Error, since it sometimes works fine.

Can anybody tell me at what point Vray tends to react in this manner (Reset to defaults)?

Best regards, Peter

P.S. Find an excerpt of the code we used below:

TransferRender = renderers.current
TransferRender.options_dontRenderImage = true

TransferRender.gi_on = true

TransferRender.gi_primary_type = 0 -- Set to IR
            TransferRender.gi_secondary_type = 3 -- Set to LC

TransferRender.gi_irradmap_preset =0 -- custom mode
            TransferRender.gi_irradmap_showCalcPhase = true
            TransferRender.adv_irradmap_mode = 1 -- IR Multiframe Incremental
            TransferRender.gi_irradmap_minRate = -4
            TransferRender.gi_irradmap_maxRate = -2
            TransferRender.adv_irradmap_autoSave = true
            TransferRender.adv_irradmap_autoSaveFileName = PathIrradianceMap.text

TransferRender.lightcache_showCalcPhase = true
            TransferRender.lightcache_subdivs = 1000
            TransferRender.lightcache_mode = 1 -- LC Flythrough
            TransferRender.lightcache_autoSave = true
            TransferRender.lightcache_autoSaveFileName = PathLightCache.text

Will try to reproduce this here; can you tell me which 3ds Max version you are using?

Best regards,
Vlado

Hi, Vlado

I set this script up on my laptop with VrayDemo installed. Tested the script in our office with the full Vray-Version and the error did not occur so far.

Max is 2011 Design.

Thanx so far … Peter

Hi,
It is normal for the demo version to reset it’s settings.

Also you may have it fixed already, but in the code excerpt above there is a problem with the following line:
“TransferRender.lightcache_showCalcPhase = true”

the lightcache_showCalcPhase is Integer value and assigning “true” returns conversion error

Best regards