View2D Operators#

bpy.ops.view2d.edge_pan(*, inside_padding=1.0, outside_padding=0.0, speed_ramp=1.0, max_speed=500.0, delay=1.0, zoom_influence=0.0)#

Pan the view when the mouse is held at an edge

Parameters:
  • inside_padding (float in [0, 100], (optional)) – Inside Padding, Inside distance in UI units from the edge of the region within which to start panning

  • outside_padding (float in [0, 100], (optional)) – Outside Padding, Outside distance in UI units from the edge of the region at which to stop panning

  • speed_ramp (float in [0, 100], (optional)) – Speed Ramp, Width of the zone in UI units where speed increases with distance from the edge

  • max_speed (float in [0, 10000], (optional)) – Max Speed, Maximum speed in UI units per second

  • delay (float in [0, 10], (optional)) – Delay, Delay in seconds before maximum speed is reached

  • zoom_influence (float in [0, 1], (optional)) – Zoom Influence, Influence of the zoom factor on scroll speed

bpy.ops.view2d.ndof()#

Use a 3D mouse device to pan/zoom the view

bpy.ops.view2d.pan(*, deltax=0, deltay=0)#

Pan the view

Parameters:
  • deltax (int in [-inf, inf], (optional)) – Delta X

  • deltay (int in [-inf, inf], (optional)) – Delta Y

bpy.ops.view2d.reset()#

Reset the view

bpy.ops.view2d.scroll_down(*, deltax=0, deltay=0, page=False)#

Scroll the view down

Parameters:
  • deltax (int in [-inf, inf], (optional)) – Delta X

  • deltay (int in [-inf, inf], (optional)) – Delta Y

  • page (boolean, (optional)) – Page, Scroll down one page

bpy.ops.view2d.scroll_left(*, deltax=0, deltay=0)#

Scroll the view left

Parameters:
  • deltax (int in [-inf, inf], (optional)) – Delta X

  • deltay (int in [-inf, inf], (optional)) – Delta Y

bpy.ops.view2d.scroll_right(*, deltax=0, deltay=0)#

Scroll the view right

Parameters:
  • deltax (int in [-inf, inf], (optional)) – Delta X

  • deltay (int in [-inf, inf], (optional)) – Delta Y

bpy.ops.view2d.scroll_up(*, deltax=0, deltay=0, page=False)#

Scroll the view up

Parameters:
  • deltax (int in [-inf, inf], (optional)) – Delta X

  • deltay (int in [-inf, inf], (optional)) – Delta Y

  • page (boolean, (optional)) – Page, Scroll up one page

bpy.ops.view2d.scroller_activate()#

Scroll view by mouse click and drag

bpy.ops.view2d.smoothview(*, xmin=0, xmax=0, ymin=0, ymax=0, wait_for_input=True)#

Undocumented, consider contributing.

Parameters:
  • xmin (int in [-inf, inf], (optional)) – X Min

  • xmax (int in [-inf, inf], (optional)) – X Max

  • ymin (int in [-inf, inf], (optional)) – Y Min

  • ymax (int in [-inf, inf], (optional)) – Y Max

  • wait_for_input (boolean, (optional)) – Wait for Input

bpy.ops.view2d.zoom(*, deltax=0.0, deltay=0.0, use_cursor_init=True)#

Zoom in/out the view

Parameters:
  • deltax (float in [-inf, inf], (optional)) – Delta X

  • deltay (float in [-inf, inf], (optional)) – Delta Y

  • use_cursor_init (boolean, (optional)) – Use Mouse Position, Allow the initial mouse position to be used

bpy.ops.view2d.zoom_border(*, xmin=0, xmax=0, ymin=0, ymax=0, wait_for_input=True, zoom_out=False)#

Zoom in the view to the nearest item contained in the border

Parameters:
  • xmin (int in [-inf, inf], (optional)) – X Min

  • xmax (int in [-inf, inf], (optional)) – X Max

  • ymin (int in [-inf, inf], (optional)) – Y Min

  • ymax (int in [-inf, inf], (optional)) – Y Max

  • wait_for_input (boolean, (optional)) – Wait for Input

  • zoom_out (boolean, (optional)) – Zoom Out

bpy.ops.view2d.zoom_in(*, zoomfacx=0.0, zoomfacy=0.0)#

Zoom in the view

Parameters:
  • zoomfacx (float in [-inf, inf], (optional)) – Zoom Factor X

  • zoomfacy (float in [-inf, inf], (optional)) – Zoom Factor Y

bpy.ops.view2d.zoom_out(*, zoomfacx=0.0, zoomfacy=0.0)#

Zoom out the view

Parameters:
  • zoomfacx (float in [-inf, inf], (optional)) – Zoom Factor X

  • zoomfacy (float in [-inf, inf], (optional)) – Zoom Factor Y