vrdMaterialNode¶
-
class
vrdMaterialNode
¶
(Inherits vrdNode
)
Class for a node with a material.
In the Scenegraph, this is a Material Group node. In the Material Editor, this node type is used to hold materials in the material graph.
# create a material group node in the Scenegraph:
c = vrMaterialService.createMaterial("c", vrMaterialTypes.Chrome)
sphere = vrGeometryService.createSphere(vrScenegraphService.getRootNode(), 100)
mg = vrScenegraphService.createNode(vrScenegraphTypes.NodeType.MaterialNode)
mg.children.append(sphere)
mg.setMaterial(c)
Summary¶
Functions¶
-
vrdMaterialNode.
getEnabled
()¶ Returns: True, if material override is enabled for this node Return type: bool
-
vrdMaterialNode.
getMaterial
()¶ Returns the material of the node.
Returns: The material of the node. Return type: vrdMaterial
-
vrdMaterialNode.
setEnabled
(value)¶ Enables or disables material override for this node.
If enabled, all geometries in the sub tree of this node are rendered with the material of this node.
Parameters: value (bool) – If True, material override is enabled.
-
vrdMaterialNode.
setMaterial
(material)¶ Sets the material of the node.
Parameters: material (vrdMaterial) – The new material of the node.