Use hou.nodeTypeCategories() to get a dict of node type category names to NodeTypeCategory objects. You can use hou.objNodeTypeCategory(), hou.sopNodeTypeCategory(), etc. to directly access a particular node type category.
See also hou.NodeType and hou.Node.
# Get the names of all the node type categories. >>> hou.nodeTypeCategories().keys() ['Shop', 'Cop2', 'CopNet', 'Particle', 'ChopNet', 'Object', 'Driver', 'Pop', 'Chop', 'Sop', 'Manager', 'Vop', 'Director', 'Dop', 'VopNet']
Methods
loadDSO(dso_path)
Loads the HDK custom operator identified by the given file path for this node type category. It will use the HOUDINI_DSO_PATH environment variable to find it if necessary.
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.
nodeVerbs()
→ dict
of str
to hou.SopVerb
Return a dict mapping verb names to node verbs in this category.
Most verbs are named after their corresponding node type. Alternatively, given a hou.SopNode, one can use hou.SopNode.verb() to extract the verb.
nodeVerb(name)
→ hou.SopVerb or None
Return a specific verb from the provided verb name. Returns None if no matching verb is found.
scriptDirName()
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 explcictly 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 explcictly 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.
See also |