Inheritance |
|
This class specializes the generic hou.NodeTypeCategory class for APEX node types. There is only one APEX node type category, which is accessible by calling hou.apexNodeTypeCategory. Note that this node type category does not appear in the list returned by hou.nodeTypeCategories(), as that method only returns OP node type categories.
¶
Methods from hou.NodeTypeCategory ¶
label()
→ str
Returns the descriptive of this node type category that appears in network editor panes.
name()
→ str
Returns the name of this node type category.
nodeTypes()
→ dict
of str
to hou.NodeType
Return a dict mapping node type names to node types in this category.
For example, if this node type category is SOPs, the keys in the dictionary would be “box”, “sphere”, “polyextrude”, “subdivide”, etc.
Note that the node types in this category may not all be instances of the same class. For example, most node types in the SOP node type category are instances of hou.SopNodeType, but some, like SHOP networks, CHOP networks, etc. are not.
# Access the box SOP's node type. hou.sopNodeTypeCategory().nodeTypes()['box']
def findNodeTypes(node_type_category, pattern): '''Return a list of node types in a particular node type category whose names match a pattern.''' import fnmatch return [node_type for node_type_name, node_type in node_type_category.nodeTypes().items() if fnmatch.fnmatch(node_type_name, pattern)]
See also hou.nodeType().
nodeType(type_name)
→ hou.NodeType or None
Returns a single node type that matched the provided type name. Returns None if the type name doesn’t match a node type in this category.
hasSubNetworkType()
→ bool
Return True if the category contains a node type that creates sub-network nodes.
defaultColor()
→ hou.Color
Return the color used to display a node of this type category in the network view if the node’s hou.nodeFlag.ColorDefault flag is set, and no default color has been set for that node’s hou.NodeType.
clearDefaultColors()
Clear the default color assignment for every hou.NodeType in this category. This method is faster than clearing the default for each node type individually.
setDefaultColor(color)
Set the color used to display a node of this type in the
network view if the node’s hou.nodeFlag.ColorDefault flag is set,
and no default color has been set for that node’s hou.NodeType.
Pass None as the color
parameter to revert to the standard default.
defaultShape()
→ str
Return the name of the shape used to display a node of this type in the network view if no shape is explicitly assigned to the node, and no default shape has been set for that node’s hou.NodeType.
clearDefaultShapes()
Clear the default shape assignment for every hou.NodeType in this category. This method is faster than clearing the default for each node type individually.
setDefaultShape(shape)
Set the name of the shape used to display a node of this type in the
network view if no shape is explicitly assigned to the node,
and no default shape has been set for that node’s hou.NodeType.
Pass None as the shape
parameter to revert to the standard default.
defaultWireStyle()
→ str
Return the name of the default wiring style used in networks consisting of child nodes belonging to this node type category.
setDefaultWireStyle(wirestyle)
Set the name of the default wiring style used in networks consisting of
child nodes belonging to this node type category. The supported wiring
styles are "rounded"
and the empty string (or None
). An empty string
uses the default straight wiring style.