NodesUsdAPI¶
Initialisation for NodesUsdAPI module
- class NodesUsdAPI.NodeUsd¶
Bases:
CommonNodeInterface
,PythonNode
Base class for usd nodes which implements the CommonNodeInterface.
Derived nodes should implement
_getEngineChain
which specifies the node’s engine chain on the engine chain interface. The engines themselves are then created on a given traversal’s transaction inonTraversalVisit
which is the main interface to the traversal.- __init__() None ¶
- getEngineIds()¶
- Returns:
A list
UsdProcessingEngine.VecIds
of the EngineIds last made by this node from the last time it was called upon to provide traversal information inonTraversalVisit()
.- Return type:
UsdProcessingEngine.VecIds
- static getFamilyType()¶
This method should be overridden in a derived class. It should return a type which is the base for further derived types. For example any Geolib nodes would return the same string from this function and any USD nodes would return a different string.
- Returns:
The type for which derived nodes are a part of.
- getIncomingLocalUsgValue(prim, paramName)¶
Used by the StageParameterPolicy to retrieve usg.Value data from a prim (either attribute data, metadata or relationship). It is up to this method what data is given to the StageParameterPolicy for a given parameter name. The default behaviour is to get attribute data from that prim, with paramName that matches a USD attribute name.
- getOutputState()¶
Return current output state of transaction
- onTraversalVisit(port, transaction, inputs, graphState, visitedState, forceProcessing)¶
Called by the traversal to append this node’s engines to the transaction.
- NodesUsdAPI.GetStage(node, maskPaths=None)¶
Returns the composed stage from this node. This starts a traversal from the node specified by the
node
argument.- Return type:
- Parameters:
node (
NodegraphAPI.Node
) – The node in the scene to traverse from.maskPaths (
usg.PathArray
) – The :py:obj:`usg.Path`s to pass to the stage to mask composition.
- Returns:
The composed stage from this node.
- NodesUsdAPI.GetStageAndState(node, maskPaths=None, customGraphState=None)¶
Returns the composed stage from this node and a hash representing its state.
This kicks off a traversal from the node which is passed in, including geolib nodes as the stage could potentially depend on geolib processing.
- NodesUsdAPI.GetUsdSourceFromNodeInput(node, inputPortName, graphState)¶
Get a USD source [output] port for the specified node input by traversing connections to a source port.
- Return type:
NodegraphAPI.Port
orNone
- Parameters:
node (
NodegraphAPI.Node
) – The specified node.inputPortName (
str
) – The name of the specified input port.graphState (
NodegraphAPI.GraphState
) – The Graph State for node graph traversal.
- Returns:
An output port of a
NodeUsd
instance, orNone
if no source is found, or the source is not a USD node.- Raises:
TypeError – incorrect argument type.