Resetting VFB Lightmix with maxscript

Hello guys,

I sometimes forget to reset the lightmix parameters in the vrayVFB before rendering an animation which screws up my effectsresult-passes. To fix this, I want to reset all lightmix parameters with maxscript before rendering - essentially doing the same like pushing the “reset button”:

So far I have this code:

vfbLayers=(vfbControl #getLayerMgr)[1]
a = vfbLayers.lightMixLayer
a.reset_light_mix = 1

which works fine in one scene. But in other scenes it seems the “reset_light_mix” -property is not existing in the lightmix-interface (also confirmed this which showinterface a). I cannot figure out why exactly the property is available sometimes and sometimes not. Can you give me a hint? Is there a simpler way to reset the lightmixlayer

This is a known issue (VMAX-13559). The problem is that the LightMix MaxScript properties are created only once (with the creation of vfbLayers.lightmixlayer). If you restart 3ds Max and run it again, it should work.

EDIT: Actually, it may not be the same thing. What errors are you getting on the scene, where it doesn’t work? Are you certain a LightMix element is present (and rendered at least once)?