TrackNodes

vtool.maya_lib.core.TrackNodes() This helps track new nodes that get added to a scene after a function runs.
class TrackNodes

This helps track new nodes that get added to a scene after a function runs.

Usage: track_nodes = TrackNodes() track_nodes.load() my_function() new_nodes = track_nodes.get_delta()

load(node_type=None)
node_type corresponds to the maya node type. For example, you can give node_type the string “animCurve” to load only keyframes. When after running get_delta(), the delta will only contain keyframes.
Parameters:node_type (str) – Maya named type, ie animCurve, transform, joint, etc
Returns:None
get_delta()

Get the new nodes in the Maya scene created after load() was executed. The load() node_type variable is stored in the class and used when getting the delta.

Returns:list of new nodes.
Return type:list