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
orNone
) – The node in the B{Node Graph} from which to start searching for the node responsible for the creation of the given attribute. IfstartNode
isNone
, then the node associated withstartPort
is used. If nostartPort
is specified, the currently viewed node is used.startOp (
FnGeolibOp
orNone
) – 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
orNone
) – The output port of the start node from which to start calculating the attribute history of the given attribute, orNone
to use the first output port on the start node.startGraphState (
NodegraphAPI.GraphState
orNone
) – The graph state with which to start calculating the attribute history of the given attribute, orNone
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
orNone
) – The node in the B{Node Graph} from which to start looking for the attribute set node of of the given attribute. IfstartNode
isNone
, then the node associated withstartPort
is used. If nostartPort
is specified, the currently viewed node is used.startOp (
FnGeolibOp
orNone
) – 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
orNone
) – The output port of the start node from which to start calculating the attribute history of the given attribute, orNone
to use the first output port on the start node.startGraphState (
NodegraphAPI.GraphState
orNone
) – The graph state with which to start calculating the attribute history of the given attribute, orNone
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
oftuple
of (str
,FnAttribute
) orNone
- 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
orNone
) – The node in the B{Node Graph} from which to start looking for the attribute inheritance of of the given attribute. IfstartNode
isNone
, then the node associated withstartPort
is used. If nostartPort
is specified, the currently viewed node is used.startOp (
FnGeolibOp
orNone
) – 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
orNone
) – The output port of the start node from which to start calculating the attribute inheritance of the given attribute, orNone
to use the first output port on the start node.startGraphState (
NodegraphAPI.GraphState
orNone
) – The graph state with which to start calculating the attribute inheritance of the given attribute, orNone
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.