[Closed] VRay Render Element Properties
Anybody know how to access the render element properties for vray render elements? Specifically I’m trying to write a little script that’ll yell at me if certain render elements are clamped (velocity/zdepth, mainly), but I have no clue how to expose their properties. Anybody tried this before?
You access VRay render elements in the same way you would standard render elements.
remCurrent = maxOps.GetCurRenderElementMgr()
for i = 0 to remCurrent.NumRenderElements()-1 do --note render element manager is 0 based
(
re = remCurrent.GetRenderElement i
case (classOf re) of
(
VRayZDepth:(re.clamp_zdepth = false) --make changes to VRayZDepth / bring up messageBox here
VRayVelocity:(re.clamp_velocity = false) --make changes to VRayVelocity / bring up messageBox here
)
)
That’s wild! Never heard of the case/of expression before, seems pretty useful. Thanks Dan!
Yes case is very useful. There’s a good explanation in the maxscript help.
Render elements are no different than any other maxobjects, you can use showProperties if you want to find which properties are exposed to maxscript.
For example, in an empty scene add a VRayZDepth render element and run this with the listener open:
remCurrent = maxOps.GetCurRenderElementMgr()
re = remCurrent.GetRenderElement 0
showProperties re