PDA

View Full Version : VRay Render Element Properties


Cryptite
04-04-2012, 10:57 PM
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?

Raytracer05
04-05-2012, 11:32 AM
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
)
)

Cryptite
04-05-2012, 03:35 PM
That's wild! Never heard of the case/of expression before, seems pretty useful. Thanks Dan!

Raytracer05
04-05-2012, 04:12 PM
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

CGTalk Moderation
04-05-2012, 04:12 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.