View3D Operators

bpy.ops.view3d.background_image_add(name="Image", filepath="Path")

Add a new background image

Parameters:
  • name (string, (optional, never None)) – Name, Image name to assign
  • filepath (string, (optional, never None)) – Filepath, Path to image file
bpy.ops.view3d.background_image_remove(index=0)

Remove a background image from the 3D view

Parameters:index (int in [0, inf], (optional)) – Index, Background image index to remove
bpy.ops.view3d.camera_to_view()

Set camera view to active view

bpy.ops.view3d.camera_to_view_selected()

Move the camera so selected objects are framed

bpy.ops.view3d.clear_render_border()

Clear the boundaries of the border render and disable border render

bpy.ops.view3d.clip_border(xmin=0, xmax=0, ymin=0, ymax=0)

Set the view clipping 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
bpy.ops.view3d.copybuffer()

Selected objects are saved in a temp file

bpy.ops.view3d.cursor3d()

Set the location of the 3D cursor

bpy.ops.view3d.dolly(delta=0, mx=0, my=0)

Dolly in/out in the view

Parameters:
  • delta (int in [-inf, inf], (optional)) – Delta
  • mx (int in [0, inf], (optional)) – Zoom Position X
  • my (int in [0, inf], (optional)) – Zoom Position Y
bpy.ops.view3d.edit_mesh_extrude_individual_move()

Extrude individual elements and move

File:startup/bl_operators/view3d.py:37
bpy.ops.view3d.edit_mesh_extrude_move_normal()

Extrude and move along normals

File:startup/bl_operators/view3d.py:107
bpy.ops.view3d.edit_mesh_extrude_move_shrink_fatten()

Extrude and move along individual normals

File:startup/bl_operators/view3d.py:124
bpy.ops.view3d.enable_manipulator(translate=False, rotate=False, scale=False)

Enable the transform manipulator for use

Parameters:
  • translate (boolean, (optional)) – Translate, Enable the translate manipulator
  • rotate (boolean, (optional)) – Rotate, Enable the rotate manipulator
  • scale (boolean, (optional)) – Scale, Enable the scale manipulator
bpy.ops.view3d.fly()

Interactively fly around the scene

bpy.ops.view3d.game_start()

Start game engine

bpy.ops.view3d.layers(nr=1, extend=False, toggle=True)

Toggle layer(s) visibility

Parameters:
  • nr (int in [0, 20], (optional)) – Number, The layer number to set, zero for all layers
  • extend (boolean, (optional)) – Extend, Add this layer to the current view layers
  • toggle (boolean, (optional)) – Toggle, Toggle the layer
bpy.ops.view3d.localview()

Toggle display of selected object(s) separately and centered in view

bpy.ops.view3d.manipulator(constraint_axis=(False, False, False), constraint_orientation='', release_confirm=False)

Manipulate selected item by axis

Parameters:
  • constraint_axis (boolean array of 3 items, (optional)) – Constraint Axis
  • constraint_orientation (enum in [], (optional)) – Orientation, Transformation orientation
  • release_confirm (boolean, (optional)) – Confirm on Release, Always confirm operation when releasing button
bpy.ops.view3d.move()

Move the view

bpy.ops.view3d.navigate()

Interactively navigate around the scene (uses the mode (walk/fly) preference)

bpy.ops.view3d.ndof_all()

Pan and rotate the view with the 3D mouse

bpy.ops.view3d.ndof_orbit()

Orbit the view using the 3D mouse

bpy.ops.view3d.ndof_orbit_zoom()

Orbit and zoom the view using the 3D mouse

bpy.ops.view3d.ndof_pan()

Pan the view with the 3D mouse

bpy.ops.view3d.object_as_camera()

Set the active object as the active camera for this view or scene

bpy.ops.view3d.pastebuffer()

Contents of copy buffer gets pasted

bpy.ops.view3d.properties()

Toggles the properties panel display

bpy.ops.view3d.render_border(xmin=0, xmax=0, ymin=0, ymax=0, camera_only=False)

Set the boundaries of the border render and enable border render

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
  • camera_only (boolean, (optional)) – Camera Only, Set render border for camera view and final render only
bpy.ops.view3d.rotate()

Rotate the view

bpy.ops.view3d.ruler()

Interactive ruler

bpy.ops.view3d.select(extend=False, deselect=False, toggle=False, center=False, enumerate=False, object=False, location=(0, 0))

Activate/select item(s)

Parameters:
  • extend (boolean, (optional)) – Extend, Extend selection instead of deselecting everything first
  • deselect (boolean, (optional)) – Deselect, Remove from selection
  • toggle (boolean, (optional)) – Toggle Selection, Toggle the selection
  • center (boolean, (optional)) – Center, Use the object center when selecting, in editmode used to extend object selection
  • enumerate (boolean, (optional)) – Enumerate, List objects under the mouse (object mode only)
  • object (boolean, (optional)) – Object, Use object selection (editmode only)
  • location (int array of 2 items in [-inf, inf], (optional)) – Location, Mouse location
bpy.ops.view3d.select_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True)

Select items using border selection

Parameters:
  • gesture_mode (int in [-inf, inf], (optional)) – Gesture Mode
  • 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
  • extend (boolean, (optional)) – Extend, Extend selection instead of deselecting everything first
bpy.ops.view3d.select_circle(x=0, y=0, radius=0, gesture_mode=0)

Select items using circle selection

Parameters:
  • x (int in [-inf, inf], (optional)) – X
  • y (int in [-inf, inf], (optional)) – Y
  • radius (int in [-inf, inf], (optional)) – Radius
  • gesture_mode (int in [-inf, inf], (optional)) – Event Type
bpy.ops.view3d.select_lasso(path=None, deselect=False, extend=True)

Select items using lasso selection

Parameters:
  • path (bpy_prop_collection of OperatorMousePath, (optional)) – Path
  • deselect (boolean, (optional)) – Deselect, Deselect rather than select items
  • extend (boolean, (optional)) – Extend, Extend selection instead of deselecting everything first
bpy.ops.view3d.select_menu(name='', toggle=False)

Menu object selection

Parameters:
  • name (enum in [], (optional)) – Object Name
  • toggle (boolean, (optional)) – Toggle, Toggle selection instead of deselecting everything first
bpy.ops.view3d.select_or_deselect_all(extend=False, toggle=False, deselect=False, center=False, enumerate=False, object=False)

Select element under the mouse, deselect everything is there’s nothing under the mouse

Parameters:
  • extend (boolean, (optional)) – Extend, Extend selection instead of deselecting everything first
  • toggle (boolean, (optional)) – Toggle, Toggle the selection
  • deselect (boolean, (optional)) – Deselect, Remove from selection
  • center (boolean, (optional)) – Center, Use the object center when selecting, in editmode used to extend object selection
  • enumerate (boolean, (optional)) – Enumerate, List objects under the mouse (object mode only)
  • object (boolean, (optional)) – Object, Use object selection (editmode only)
File:

startup/bl_operators/view3d.py:173

bpy.ops.view3d.smoothview()

Undocumented

bpy.ops.view3d.snap_cursor_to_active()

Snap cursor to active item

bpy.ops.view3d.snap_cursor_to_center()

Snap cursor to the Center

bpy.ops.view3d.snap_cursor_to_grid()

Snap cursor to nearest grid division

bpy.ops.view3d.snap_cursor_to_selected()

Snap cursor to center of selected item(s)

bpy.ops.view3d.snap_selected_to_cursor(use_offset=True)

Snap selected item(s) to cursor

Parameters:use_offset (boolean, (optional)) – Offset
bpy.ops.view3d.snap_selected_to_grid()

Snap selected item(s) to nearest grid division

bpy.ops.view3d.toolshelf()

Toggles tool shelf display

bpy.ops.view3d.view_all(use_all_regions=False, center=False)

View all objects in scene

Parameters:
  • use_all_regions (boolean, (optional)) – All Regions, View selected for all regions
  • center (boolean, (optional)) – Center
bpy.ops.view3d.view_center_camera()

Center the camera view

bpy.ops.view3d.view_center_cursor()

Center the view so that the cursor is in the middle of the view

bpy.ops.view3d.view_center_lock()

Center the view lock offset

bpy.ops.view3d.view_center_pick()

Center the view to the Z-depth position under the mouse cursor

bpy.ops.view3d.view_lock_clear()

Clear all view locking

bpy.ops.view3d.view_lock_to_active()

Lock the view to the active object/bone

bpy.ops.view3d.view_orbit(type='ORBITLEFT')

Orbit the view

Parameters:type (enum in [‘ORBITLEFT’, ‘ORBITRIGHT’, ‘ORBITUP’, ‘ORBITDOWN’], (optional)) –

Orbit, Direction of View Orbit

  • ORBITLEFT Orbit Left, Orbit the view around to the Left.
  • ORBITRIGHT Orbit Right, Orbit the view around to the Right.
  • ORBITUP Orbit Up, Orbit the view Up.
  • ORBITDOWN Orbit Down, Orbit the view Down.
bpy.ops.view3d.view_pan(type='PANLEFT')

Pan the view

Parameters:type (enum in [‘PANLEFT’, ‘PANRIGHT’, ‘PANUP’, ‘PANDOWN’], (optional)) –

Pan, Direction of View Pan

  • PANLEFT Pan Left, Pan the view to the Left.
  • PANRIGHT Pan Right, Pan the view to the Right.
  • PANUP Pan Up, Pan the view Up.
  • PANDOWN Pan Down, Pan the view Down.
bpy.ops.view3d.view_persportho()

Switch the current view from perspective/orthographic projection

bpy.ops.view3d.view_roll(angle=0.0)

Roll the view

Parameters:angle (float in [-inf, inf], (optional)) – Roll
bpy.ops.view3d.view_selected(use_all_regions=False)

Move the view to the selection center

Parameters:use_all_regions (boolean, (optional)) – All Regions, View selected for all regions
bpy.ops.view3d.viewnumpad(type='FRONT', align_active=False)

Use a preset viewpoint

Parameters:
  • type (enum in [‘FRONT’, ‘BACK’, ‘LEFT’, ‘RIGHT’, ‘TOP’, ‘BOTTOM’, ‘CAMERA’], (optional)) –

    View, Preset viewpoint to use

    • FRONT Front, View From the Front.
    • BACK Back, View From the Back.
    • LEFT Left, View From the Left.
    • RIGHT Right, View From the Right.
    • TOP Top, View From the Top.
    • BOTTOM Bottom, View From the Bottom.
    • CAMERA Camera, View From the Active Camera.
  • align_active (boolean, (optional)) – Align Active, Align to the active object’s axis
bpy.ops.view3d.walk()

Interactively walk around the scene

bpy.ops.view3d.zoom(delta=0, mx=0, my=0)

Zoom in/out in the view

Parameters:
  • delta (int in [-inf, inf], (optional)) – Delta
  • mx (int in [0, inf], (optional)) – Zoom Position X
  • my (int in [0, inf], (optional)) – Zoom Position Y
bpy.ops.view3d.zoom_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0)

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

Parameters:
  • gesture_mode (int in [-inf, inf], (optional)) – Gesture Mode
  • 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.view3d.zoom_camera_1_to_1()

Match the camera to 1:1 to the render output

Previous topic

View2D Operators

Next topic

Wm Operators