NodesUsdAPI
Initialisation for NodesUsdAPI module
- class NodesUsdAPI.NodeUsd
Bases:
PythonNodeUsd
,LegacyNodeInterface
- class NodesUsdAPI.PythonNodeUsd
Bases:
Node
USD node class.
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
- _getEngineChain(arg0: NodesUsdAPI_cmodule.EngineChainInterface) None
- getAllEngineIds() List[int]
- Returns:
A list of the engine ids that were cached during
onTraversalVisit()
for this node.- Return type:
UsdProcessingEngine.VecIds
- getFamily() NodegraphAPI.NodeFamily
- getIncomingLocalUsgValue(arg0: usg::Prim, arg1: str) Union[usg::Value, None]
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.
- static getInstanceCount() int
getInstanceCount() -> int
- Returns:
The number of instances of the class.
- 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.
- Return type:
tuple
ofusg.Stage
fdk.Hash
- 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.customGraphState (
NodegraphAPI.GraphState
) – An optional custom Graph State for node graph traversal, if not set we utilize the graphState from the current node.
- Returns:
The composed stage from this node and the state.
- 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.