nukescripts.geosnap3d.pivot_to_bbox

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

Translate and optionally rotate the specified node’s Pivot Point to a chosen point on the currently selected prim’s bounding box.

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

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

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

  • command (str) – The side of the bounding box to snap to. This must be one of: Center/Top/Bottom/Left/Right/Front/Back

  • 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 prim 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.