View2D Operators

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)

Undocumented

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
bpy.ops.view2d.zoom(deltax=0.0, deltay=0.0)

Zoom in/out the view

Parameters:
  • deltax (float in [-inf, inf], (optional)) – Delta X
  • deltay (float in [-inf, inf], (optional)) – Delta Y
bpy.ops.view2d.zoom_border(xmin=0, xmax=0, ymin=0, ymax=0, 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
  • 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