hou.NodeType class
hou.NodeType is a class representing a type of a node. hou.nodeType() is a function which returns the NodeType object for a node type name.
Subclasses: hou.SopNodeType , hou.ShopNodeType
You can get a NodeType object from a Node object by calling its nodeType() method, for example hou.node("/obj/geo1").nodeType(). You can also use the hou.nodeType(category, name) function, where the first argument is a hou.NodeTypeCategory object and the second argument is a node name string. You can use hou.nodeTypeCategories to get a dictionary of category names to hou.NodeTypeCategory objects.
# Get the NodeType for the Geometry object objcategory = hou.nodeTypeCategories()["Object"] geotype = hou.nodeType(objcategory, "geo") # Get the NodeType for the Sphere SOP sopcategory = hou.nodeTypeCategories()["Sop"] spheretype = hou.nodeType(sopcategory, "sphere")
Methods
addAlias(self, alias)-
Add an alias for this node type. Allows a node of that type to be created using an alternate name.
addSelector(self, name, selector_type, prompt='Select components', primitive_types=(), group_parm_name=None, group_type_parm_name=None, input_index=0, input_required=True, allow_dragging=False, empty_string_selects_all=True)→ Selectoraliases(self)→tupleofstr-
Returns all current aliases for this node type.
allInstalledDefinitions(self)→tupleof hou.HDADefinition-
Searches all installed operator type libraries and returns the list of available
HDADefinitions for this node type. category(self)→ hou.NodeTypeCategory-
Returns the node type category for this node type. For example, for the geometry object, the result would be the object returned by hou.objectNodeTypeCategory().
definition(self)→ hou.HDADefinition-
Returns the
HDADefinitiondefining this node type, for digital assets. description(self)→str-
Returns a description of this node type. For example, for the geometry object, the description would be
"Geometry". destroy(self)hasUnorderedInputs(self)→boolhdaModule(self)→ hou.HDAModule-
Returns the
HDAModuleobject for this node type. If the type is not for a digital asset, the module is empty. Otherwise, the module contents will be user-defined “Python Module” section in the digital asset. icon(self)→str-
Returns the name of the icon for this node type.
instances(self)→ tuple of hou.Node-
Return a list of all the nodes of this type in the current scene.
isGenerator(self)→boolisManager(self)→bool-
Returns whether this NodeType is a manager node. The manager nodes are
/obj,/out,/part,/ch,/shop,/img, and/vex, as well as some container node types, like the SHOP network node type. maxNumInputs(self)→int-
Returns the maximum number of inputs nodes of this type can have.
maxNumOutputs(self)→int-
Returns the maximum number of outputs nodes of this type can have.
minNumInputs(self)→int-
Returns the minimum number of inputs nodes of this type can have.
name(self)→str-
Returns the name of this node type. For example, for the geometry object, the name would be “geo”. The name and the node type category together uniquely identify a node type.
nameWithCategory(self)→str-
Returns the name of the node type, prefixed with the name of the node type category. For example, for the geometry object, this function would return
"Object/geo". The name and the node type category together uniquely identify a node type. openEditorDialog(self)parmTemplates(self)→ tuple of hou.ParmTemplate-
Returns a list of parm templates for the parameters on this node type. Note that spare parameters on individual node instances are not included in this list.
presets(self)→ tuple of NodeParmPresetssremoveAlias(self, alias)-
Removes an alias for this node type.
saveHDA(self, file_name, template_node=None, HDAOptions options=None)selectors(self)→ tuple of SelectorssetHidden(self, hidden)showHelp(self)source(self)→ hou.nodeTypeSource enum valuesourceFilePath(self)→ stringsourceNetwork(self)→ Node or NonesourcePath(self)→ string