nukescripts.geosnap3d.pivot_to_selection

nukescripts.geosnap3d.pivot_to_selection(node_to_snap, frames, translate_enabled, rotate_enabled, animate_single_frame=False, stage=None, task=None)[source]

Translate and/or rotate the specified node’s Pivot Point to the average position/rotation of the current vertex selection on the stage.

Parameters
  • node_to_snap (nuke.Node) – Node to translate/rotate

  • frames (int or int array) – The frame or array of frames to affect

  • translate_enabled (boolean) – Whether to apply the translation to the node

  • rotate_enabled (boolean) – Whether to apply the rotation to the node

  • animate_single_frame (boolean) – If true, will set key for animation if affecting 1 frame. Always will set keys for animation if affecting multiple frames

  • stage (pxr.Usd.Stage) – The stage to get the selected vertex info from. If None, this method will attempt to get the stage from the active viewer.

  • task (nuke.ProgressTask) – An optional progress task that will update as frames are processed.

Returns

True if this method was successful, False otherwise.