[Closed] vray object properties via mxs
Hi all. I’ve not been able to find any info on accessing vray object properties via mxs. I know I can pop up the dialog using ‘doVRayObjectProperties()’ but that still requires user input and i’d like to fully automate the process. Basically all I need to do is change object(s) alpha contribution to -1 and check the ‘matte object’ box.
Anyone know if its possible?
These Vray object properties are simply stored as User Defined Properties. VRay_Matte_Alpha and VRay_Matte_Enable are the properties you want to modify. See MAXScript documentation at “Node User-Defined Properties and Methods”. getUserProp and setUserProp are the most used functions.
I’ve written a modeless editor for userproperties, which means you don’t have to hit properties and to edit and hit ok. Just select an object and edit it’s properties.
You could also pick the code apart and use what you need for your script.
http://scripts.subd.nl/?f=JHN_userPropBuffer.ms
Run it and make a shortcut or menu item, you can find it in JHN’s Tools.
-Johan
thanks guys.
FYI for anyone reading this having problems: one thing i’ve noticed is that the user properties are case sensitive, so “VRay_Matte_Enable” is not the same as “vray_matte_enable”