hou.NodeType class

A NodeType specifies the information common to all instances of a type of node, such as the parameter set, algorithm, minimum number of inputs, etc. For example, the geometry object and subdivide SOP are node types. /obj/geo1 and /obj/geo2, on the other hand, are Nodes that are instances of the geometry object node type.

Subclasses: hou.ShopNodeType , hou.SopNodeType

Note that a digital asset defines a node type. The nodes contained inside the asset’s definition implement the node type’s algorithm, and you can customize the parameters in the node type using the Type Properties dialog,

You can get a NodeType object from a Node object with hou.Node.type. For example, if /obj/geo1 is a geometry object, hou.node("/obj/geo1").type() will return the NodeType corresponding to all geometry objects.

All the node types in Houdini are organized into categories, and a node type is uniquely identified by its category and node type name. For example, objects, SOPs, POPs, etc. are node type categories. You can also access a NodeType object from a category with hou.NodeTypeCategory.nodeTypes. Similarly, you can call hou.nodeType_ with the category and node type name.

See also hou.Node and hou.NodeTypeCategory.

Methods

name(self)str

Return the name of this node type. For example, for the geometry object type, the name is “geo”. The name and the node type category together uniquely identify a node type.

nameWithCategory(self)str

Return the name of the node type, prefixed with the name of the node type category. For example, for the geometry object, this function returns "Object/geo". The category name and type name together uniquely identify a node type.

>>> hou.nodeType(hou.objNodeTypeCategory(), "geo").nameWithCategory()
'Object/geo'
description(self)str

Return the description of this node type that appears in the tab menu. For example, for the geometry object, the description is "Geometry". This description is also called the operator label in Houdini.

instances(self)tuple of hou.Node

Return a tuple of all the nodes of this type in the current scene.

category(self)hou.NodeTypeCategory

Return the node type category for this node type. For example, for the geometry object, the result is the object returned by hou.objNodeTypeCategory.

parmTemplates(self)tuple of hou.ParmTemplate

Return a tuple of parm templates for the parameters on this node type. Note that spare parameters on individual node instances are not included in this tuple, since they are independent from the node type.

definition(self)hou.HDADefinition

If this node type corresponds to a digital asset, return the hou.HDADefinition. Otherwise, return None.

allInstalledDefinitions(self)tuple of hou.HDADefinition

Search all installed operator type libraries and return a tuple of available hou.HDADefinition objects providing definitions for this node type.

Houdini allows multiple otl files to be loaded at the same time that each contain definitions for the same node type. The definition in use is called the current definition. See also hou.HDADefinition.isCurrent.

hdaModule(self)hou.HDAModule

Return the HDAModule object for this node type. If the type is not for a digital asset, the module is empty. Otherwise, the module contains the functions, constants, classes, etc. in the user-defined “PythonModule” section of the digital asset.

You can use hou.Node.hdaModule as a shortcut to access the HDAModule from a node instance.

See hou.HDAModule for more information.

aliases(self)tuple of str

Return all current aliases for this node type. See hou.NodeType.addAlias for an example.

addAlias(self, alias)

Add an alias for this node type. You can use this alias when creating new nodes.

>>> geo_type = hou.nodeType(hou.objNodeTypeCategory(), "geo")
>>> geo_type.addAlias("transformable")
>>> geo_type.aliases()
('transformable',)
>>> hou.node("/obj").createNode("transformable")
<hou.ObjNode of type geo at /obj/geo1>
removeAlias(self, alias)

Remove an alias for this node type.

hidden(self) → bool

Return whether or not this node type appears in the tab menu. See also hou.NodeType.setHidden.

setHidden(self, hidden)

Set whether or not this node type appears in the tab menu. See also hou.NodeType.hidden.

minNumInputs(self)int

Return the minimum number of inputs that nodes of this type can have. If these inputs are not connected, the node will generate an error.

maxNumInputs(self)int

Return the maximum number of inputs that nodes of this type can have. Return 9999 if this node type can accept an unlimited number of inputs (e.g. the merge SOP).

maxNumOutputs(self)int

Return the maximum number of outputs that nodes of this type can have. Most node types have only one output, but some, like the split dop, can have multiple.

hasUnorderedInputs(self)bool

Return whether it is impossible for this node type to have gaps in its connected inputs. For example, the cookie SOP has two inputs, and it’s possible for only the second input to be connected, so this method would return False. However, the merge SOP cannot have any gaps in its inputs, so this method would return True.

See also hou.Node.inputs, hou.Node.inputConnections, and hou.Node.inputConnectors.

isGenerator(self)bool

Return if this node type has been flagged as a generator. For example, a grid SOP generates new geometry, while a subdivide SOP does not, and instead processes the geometry passed into it. See also hou.NodeType.minNumInputs.

isManager(self)bool

Return whether this NodeType is a manager. The manager node instances are /obj, /out, /part, /ch, /shop, /img, and /vex, as well as manager nodes like SHOP networks.

icon(self)str

Return the name or path of the icon for this node type. Note that node types that ship with Houdini use a name instead of a full path, and Houdini uses its search path to locate the icon with that name.

source(self)hou.nodeTypeSource enum value

Return a hou.nodeTypeSource enumerated value to indicate if this node type is implemented in VEX, RSL, or the HDK (in C++), or if it is a built-in node type that ships with Houdini.

>>> obj_cat = hou.objNodeTypeCategory()
>>> sop_cat = hou.sopNodeTypeCategory()
>>> hou.nodeType(obj_cat, "biped_auto_rig").source()
nodeTypeSource.Subnet
>>> hou.nodeType(sop_cat, "mountain").source()
nodeTypeSource.VexCode
sourcePath(self)str

Return the path to the source for this node type, or "Internal" if it is a built-in node type. If the node was created using the HDK, return the path to the shared object/dll for the node type.

>>> obj_cat = hou.objNodeTypeCategory()
>>> hou.nodeType(obj_cat, "biped_auto_rig").sourcePath()
'oplib:/Object/biped_auto_rig?Object/biped_auto_rig'
>>> hou.nodeType(obj_cat, "geo").sourcePath()
'Internal'
sourceNetwork(self)hou.Node or None

If this node type is a digital asset, return the Node instance whose contents define the digital asset. Otherwise, return None.

uninstallFromPath(self)

Remove this node and any references to it from a particular filesystem installation path. For example, this method will remove vex files, icons, dialog scripts, help cards, etc. for custom installed old-style non-otl node types.

If you call this method on built-in node types, it will have no effect.

node_type.uninstallFromPath(hou.homeHoudiniDirectory())

See also hou.hda.uninstallFile and hou.HDADefinition.destroy.