| Inheritance | 
Note that this refers to dependency graph nodes, not Houdini network nodes.
Node objects have methods for accessing work items, dirtying and running the node, and traversing the graph.
Methods ¶
addDependency(dependency_type, dependency_key)
        
Adds an external dependency to the node with the specified type and key. This method has the same effect as calling pdg.GraphContext.addDependency with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
addFileDependency(dependency_key)
        
Adds a file dependency to the node with the specified key. This method has the same effect as calling pdg.GraphContext.addiFileDependency with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
addEventHandler(handle, filter=pdg.EventType.All, pass_handler=False)
  → pdg.PyEventHandler
        
Adds an event handler to the node, with a value of the type of event to receive.  The handler should be a callable that accepts one argument of type pdg.Event.
If pass_handler is True, the handler itself is passed as the first argument to
    the function, otherwise only the event object is passed to the function.
addEventHandler(handle, event_types:
 pdg.EventType, pass_handler=False)
  → pdg.PyEventHandler
        
Adds an event handler to the node, with a list of the types of events to receive.  The handler should be a callable that accepts one argument of type pdg.Event.
If pass_handler is True, the handler itself is passed as the first argument to
    the function, otherwise only the event object is passed to the function.
addParameter(port_name, port_label, port_tag, data_type, port_size)
        
Adds a custom parameter to a node. This method has the same effect as calling pdg.GraphContext.addParameter with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
appendDirty(dirty_state)
        
Appends the work items in this node to an existing pdg.WorkItemDirty object for tracking dirty operations.
cancel()
        
#cppname PDG_Node::cancel
Cancels any work items that are cooking in the node and any future work items that have not yet been scheduled. Other nodes in the graph are not effected, but downstream work items that depend on items in the node will also be canceled indirectly.
connect(port_name, dst_node_name, dst_port_name)
        
Connect another node to this one. This method has the same effect as calling pdg.GraphContext.connect with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
cook(block)
  → bool
        
Cooks the node. Block determines if the cook should block the caller or
    if the cook should be async. Returns True on success.
cookError(message)
        
Issues a cook error on this node.
cookWarning(message)
        
Issues a cook warning on this node.
dirty(remove_outputs)
        
Dirties the node and deletes all of its work items. If remove_outputs is True, the output files for the work items are deleted on disk.
It is invalid to dirty a node while the PDG graph is actively cooking.
disconnect(port_name, dst_node_name, dst_port_name)
        
Disconnect another node from this one. This method has the same effect as calling pdg.GraphContext.disconnect with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
memoryUsage()
  → pdg.MemoryInfo
        
Queries memory usage of the node and the work items inside it.
nodeOptions(force_update)
        
Returns the current pdg.NodeOptions for the node. If force_update is
    True the options will be recreated using the node’s onConfigureNode callback.
outputFiles(localize)
  → list
 of pdg.File
        
Returns the aggregate output file list for all items in the node as a list of pdg.File objects.
prepareDirty()
  → pdg.WorkItemDirty
        
Prepares a dirty of the node’s work items and their dependents, but does not apply the operation to the graph. Instead, the dirty operation is stored to a pdg.WorkItemDirty instance so that it can be applied to the graph at a later point.
removeEventHandler(handler)
        
Removes an event handler from the node.
removeAllEventHandlers()
        
Removes all event handlers from the node.
removeDependency(dependency_key)
        
Removes an external dependency from the node. This method has the same effect as calling pdg.GraphContext.removeDependency with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
resultData(localize)
  → list
 of pdg.File
        
This method is deprecated. Use pdg.Node.outputFiles instead.
reserveIndexBlock(num_indices)
  → int
        
Rerseves num_indices contiguous work item indices and returns the first index in that list. This method is useful when implementing a dynamic node with work item counts that vary based on upstream work item data. This method only works if all indices are created using it – it is still up to the node author to make sure that calls to add work items are actually using values in the reserved range.
setExpression(name, expression, index=0)
        
Sets a parameter with the specified name to the Python expression string. This method has the same effect as calling pdg.GraphContext.setExpression with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
setExpressions(dict)
        
Sets multiple parameter expressions on the node, expressed as a dictionary mapping parameter names to expression strings. This method has the same effect as calling pdg.GraphContext.setExpressions with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
setParameter(name, value, index=0)
        
Sets a parameter with the specified name to the specified value or expression. This method has the same effect as calling pdg.GraphContext.setParameter with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
setParameters(dict)
        
Sets multiple parameter values on the node, expressed as a dictionary mapping parameter names to value or expression strings. This method has the same effect as calling pdg.GraphContext.setParameters with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
setScheduler(scheduler_name)
        
Sets the scheduler for the node. This method has the same effect as calling pdg.GraphContext.setScheduler with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
setValue(name, value, index=0)
        
Sets a parameter with the specified name to value. This method has the same effect as calling pdg.GraphContext.setValue with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
setValues(dict)
        
Sets multiple parameter values on the node, expressed as a dictionary mapping parameter names to values. This method has the same effect as calling pdg.GraphContext.setValues with the node’s name as its first argument.
Warning
This method should not be called on PDG nodes that were created using TOPs. Use methods from hou.TopNode intead to manipulate node parameters and connectivity.
stats()
  → pdg.NodeStats
        
Returns the generate and cook time stats for this node.
context
 : pdg.GraphContext
        
Property
The graph context that contains the node.
dependencies
 : list
 of pdg.Dependency
        
Property
The list of dependencies this node depends on.
isCooked
 : bool
        
Property
Set to True if the node is cooked.
isDynamic
 : bool
        
Property
Set to True if the node is dynamic for any reason, can include the configuration of the node itself, the attributes it references, or input node configurations.
isDynamicGenerator
 : bool
        
Property
Set to True if the node itself is configured to be dynamic using the Generate When parameter or by referencing a dynamic attribute in an expression.
loopDepth
 : int
        
Property
The nested loop depth if this node is in a loop block, else -1.
name
 : str
        
Property
The unique name for the node, within the pdg.Graph that contains it.
partitions
 : list
 of pdg.WorkItem
        
Property
The list of partitions stored on the node, if it is a partitioner.
regenerateReason
 : pdg.regenerateReason
        
Property
If this node is regenerating work items, this property returns an enum value describing why the regeneration is occurring.
scheduler
 : pdg.SchedulerBase
        
Property
The node’s custom scheduler, or the pdg.GraphContext's default scheduler if the node has no custom scheduler.
serviceName
 : str
        
Property
The name of the service used by work items in this node. This value is derived from the service parameter and any active service blocks that contain the node.
type
 : pdg.NodeCallbackType
        
Property
The type object used to create the node.
workItems
 : list
 of pdg.WorkItem
        
Property
The list of all regular work items on this node, both static and dynamic.
Methods from pdg.NodeInterface ¶
__getitem__(port_name)
  → pdg.Port
        
Returns the port for the given name.
default(parameter_name)
  → int
, float
 or str
        
Returns the default value for the specified parameter.
input(input_number)
  → pdg.Port
        
Returns the input port for the given input number.
inputsForNode(other_node)
  → list
 of pdg.Port
        
Returns the port(s) on this node that are connected to the given node, or the empty list if there are no connections.
inputsForWorkItem(work_item)
  → list
 of pdg.Port
        
Returns the port(s) on this node that are connected to the node that owns the specified work tiem, or the empty list if there are no connections.
isItemFromPort(work_item, port_name)
  → bool
        
Returns True if the work item was passed as an input from the input
    port with the specified port_name. Returns False otherwise.
output(output_number)
  → pdg.Port
        
Returns the output port for the given output number.
parameter(parameter_name)
  → pdg.Port
        
Returns the parameter port for the given name.
parametersForTag(tag)
  → list
 of pdg.Port
        
Returns the list of parameters with the specified tag.
port(port_type, number)
  → pdg.Port
        
Returns the port for the specified pdg.portType and port number.
portCount()
  → int
        
Returns the number of points on the interface.
ports(port_type)
  → list
 of pdg.Port
        
Returns the list of ports of the specified pdg.portType.
value(parameter_name)
  → int
, float
 or str
        
Returns the constant value for the specified parameter.
topNode()
 : hou.TopNode
        
Returns the hou.TopNode associated with this PDG node.
attributeInfo
 : pdg.AttributeInfo
        
Property
Returns the attribute info object for this PDG node.
scriptInfo
 : pdg.JobScriptInfo
        
Property
Returns information about the job script used by this PDG node.
topNodeId
 : int
        
Property
The unique session ID of the hou.TopNode associated with this PDG node.