Use V-Ray Material Nodes

Hi,

What is exactly this “Use V-Ray Material Nodes” button ? What does it do ? Can it be activated in a script (python) ? I’m working on a addon.
My script creates Vray materials but the “Use V-Ray Material Nodes” button is always active, as if Vray doesn’t recognize that those materials are Vray Materials.

Any help would be greately appreciated.

Hi @lh3d
The button creates a default V-Ray tree(V-Ray material + a V-Ray material output node). Given that you are creating the materials with a script you will need to do two things. Set the node tree type and more importantly that the material is a V-Ray one.


node_tree.vray.tree_type = 'MATERIAL'
material.vray.is_vray_class = True

Thank you. The issue has been resolved.