Attribute History

UI4.Util.AttributeHistory.GetAttributeCreationNode(locationPath, attributeName, startNode=None, startOp=None, startPort=None, startGraphState=None, delegateNodes=True)

Finds the node in the tree above startNode (or above the currently viewed node, if no startNode is given) which created the given attribute.

Return type:

tuple of (Nodes3DAPI.Node3D, FnAttribute) or (None, None)

Parameters:
  • locationPath (str) – The location at which the attribute exists whose creation node to return.

  • attributeName (str) – The name of the attribute at the given location whose attribute set node to return.

  • startNode (Nodes3DAPI.Node3D or None) – The node in the Node Graph from which to start searching for the node responsible for the creation of the given attribute. If startNode is None, then the node associated with startPort is used. If no startPort is specified, the currently viewed node is used.

  • startOp (FnGeolibOp or None) – The Op in the Op tree from which to start calculating the attribute history of the given attribute. This allows history to be calculated starting from terminal Ops. If this is not supplied, the output Op from the given startNode is used.

  • startPort (NodegraphAPI.Port or None) – The output port of the start node from which to start calculating the attribute history of the given attribute, or None to use the first output port on the start node.

  • startGraphState (NodegraphAPI.GraphState or None) – The graph state with which to start calculating the attribute history of the given attribute, or None to use the node graph’s current graph state. This graph state is injected at the start port, rather than the start Op.

  • delegateNodes (bool) – A flag indicating whether history should be delegated for certain node types, such as SuperTool and AttributeEditor.

Returns:

The (node, attribute) pair corresponding to the node which was responsible for creating the given attribute.

UI4.Util.AttributeHistory.GetAttributeSetNode(locationPath, attributeName, startNode=None, startOp=None, startPort=None, startGraphState=None, delegateNodes=True)

Finds the node in the tree above startNode (or above the currently viewed node, if no startNode is given) which set the given attribute to its current value.

Return type:

tuple of (Nodes3DAPI.Node3D, FnAttribute) or (None, None)

Parameters:
  • locationPath (str) – The location at which the attribute exists whose attribute set node to return.

  • attributeName (str) – The name of the attribute at the given location whose attribute set node to return.

  • startNode (Nodes3DAPI.Node3D or None) – The node in the Node Graph from which to start looking for the attribute set node of of the given attribute. If startNode is None, then the node associated with startPort is used. If no startPort is specified, the currently viewed node is used.

  • startOp (FnGeolibOp or None) – The Op in the Op tree from which to start calculating the attribute history of the given attribute. This allows history to be calculated starting from terminal Ops. If this is not supplied, the output Op from the given startNode is used.

  • startPort (NodegraphAPI.Port or None) – The output port of the start node from which to start calculating the attribute history of the given attribute, or None to use the first output port on the start node.

  • startGraphState (NodegraphAPI.GraphState or None) – The graph state with which to start calculating the attribute history of the given attribute, or None to use the node graph’s current graph state. This graph state is injected at the start port, rather than the start Op.

  • delegateNodes (bool) – A flag indicating whether history should be delegated for certain node types, such as SuperTool and AttributeEditor.

Returns:

The (node, attribute) pair corresponding to the node which was responsible for setting the given attribute to its current value.

UI4.Util.AttributeHistory.GetAttributeInheritance(locationPath, attributeName, startNode=None, startOp=None, startPort=None, startGraphState=None)

Computes the inheritance of the specified attribute in the scene graph hierarchy.

Return type:

list of tuple of (str, FnAttribute) or None

Parameters:
  • locationPath (str) – The location at which the attribute exists whose attribute inheritance to return.

  • attributeName (str) – The name of the attribute at the given location whose attribute inheritance to return.

  • startNode (Nodes3DAPI.Node3D or None) – The node in the Node Graph from which to start looking for the attribute inheritance of of the given attribute. If startNode is None, then the node associated with startPort is used. If no startPort is specified, the currently viewed node is used.

  • startOp (FnGeolibOp or None) – The Op in the Op tree from which to start calculating the attribute inheritance of the given attribute. This allows inheritance to be calculated starting from terminal Ops. If this is not supplied, the output Op from the given startNode is used.

  • startPort (NodegraphAPI.Port or None) – The output port of the start node from which to start calculating the attribute inheritance of the given attribute, or None to use the first output port on the start node.

  • startGraphState (NodegraphAPI.GraphState or None) – The graph state with which to start calculating the attribute inheritance of the given attribute, or None to use the node graph’s current graph state. This graph state is injected at the start port, rather than the start Op.

Returns:

A list of pairs of location paths and attributes reflecting the inheritance of the specified attribute in the scene graph hierarchy.