I was wondering if it was possible to lock the view (similar to quad view), so that the view doesn't change if I accidentally bump the middle mouse button.

Is there a setting I can change or a script that can do this?

  • $\begingroup$ While working in a 2D view my Apple Magic mouse is too sensitive, causing me to rotate the view accidentally - switching to an old school mouse with a wheel for scrolling helps prevent any accidental 3D view movement. But having 2 mice on the desk isn't ideal. $\endgroup$ Commented Apr 3 at 16:53

6 Answers 6


Short answer - no.

However this may help...

  • I assume that you may have a view rotation that took some time to setup, if this is the case you could...

    • Add an empty, Enable Align to View
    • Then use 'Shift+Numpad1/3/7' to change the views aligned to the active object.
  • Quad view allows you to lock/unlock the view rotation. This is intended so you can maintain top/front/side views with one user view, but theres nothing stopping you setting up the rotation you want, then locking the view.

If you really want to do this with a script by writing an operator that intercepts view rotate and makes the choice to run or not, but I wouldn't recommend doing this since its fairly involved for such a small change.

  • 2
    $\begingroup$ Note, when checking align to view, I noticed the viewport would flip direction, committed fix (will be in 2.68) projects.blender.org/scm/… $\endgroup$
    – ideasman42
    Commented May 26, 2013 at 18:26

One way you might want to go about this would be to:

  1. Align Active Camera to View with CtrlAlt + Numpad 0.
  2. Lock Camera to View.
  3. Select the camera and lock it's transformations.
  • 3
    $\begingroup$ "lock it's transformations." is a dead link. This is why Stack Exchange sites don't allow links as answers, always include the info in the answer $\endgroup$
    – endolith
    Commented Sep 13, 2020 at 15:55

You can't lock the rotation of the view but you can lock the pan of the view to always center on the 3D Cursor.

Lock view to cursor

  • 1
    $\begingroup$ Omg you have helped me understand an issue I've had in one scene for ages. That lock to object box had a selection and I'd no idea how this happened. THANK YOU $\endgroup$
    – Neil
    Commented Oct 3, 2017 at 7:36

Update: Ok following comment from @Duarte Farrajota Ramos, I have created an AddOn for you:

  1. Save the following text in a text file(Example): lockViewRotation.py

    bl_info = {
        "name": "Lock View Rotation",
        "blender": (2, 80, 0),
        "category": "View",
    import bpy
    def draw_lock_rotation(self, context):
        layout = self.layout
        view = context.space_data
        col = layout.column(align=True)
        col.prop(view.region_3d, "lock_rotation", text="Lock View Rotation")
    def register():
    def unregister():
    if __name__ == "__main__":
  2. In blender go to Edit->Preferences -> Add-ons and Click the "Install..." button and chose the previously saved file

  3. Go to the "Community" tab and search for "Lock View Rotation" Addon and enable it (If you dont find it then close the properties panel and open it again)

  4. Now you will have an option "Lock View Rotation" in your View Lock section so you can create 4 views dragging the corners to split the current view in 4 (top, bottom, right, and perspective) and set the new Lock Rotation on the first 3.

enter image description here

Original Answer:

I have accomplish that in this way:

  • First Go to to you blender installation path (generally C:\Program Files\Blender Foundation\Blender 2.90\ in my case). And search for the file called: space_view3d.py in Blender 2.##\2.##\scripts\startup\bl_ui\space_view3d.py

  • Copy this file to a different location (as you wont be able to edit it directly)

  • Edit this file and search for the line containing: class VIEW3D_PT_view3d_lock(Panel):

this line is the definition for the "lock" options.

  • Go at the end of the: def draw(self, context): (this is the definition of the draw function for the "lock" options )

  • Add the following line indented at the end of the function (be careful with indentation):

col.prop(view.region_3d, "lock_rotation", text="Lock Rotation")
  • In my case the final code looks like that:
class VIEW3D_PT_view3d_lock(Panel):
        bl_space_type = 'VIEW_3D'
        bl_region_type = 'UI'
        bl_category = "View"
        bl_label = "View Lock"
        bl_parent_id = "VIEW3D_PT_view3d_properties"

        def draw(self, context):
            layout = self.layout

            layout.use_property_split = True
            layout.use_property_decorate = False  # No animation.

            view = context.space_data

            col = layout.column(align=True)
            sub = col.column()
            sub.active = bool(view.region_3d.view_perspective != 'CAMERA' or view.region_quadviews)

            sub.prop(view, "lock_object")
            lock_object = view.lock_object
            if lock_object:
                if lock_object.type == 'ARMATURE':
                        view, "lock_bone", lock_object.data,
                        "edit_bones" if lock_object.mode == 'EDIT'
                        else "bones",
                subcol = sub.column(heading="Lock")
                subcol.prop(view, "lock_cursor", text="To 3D Cursor")

            col.prop(view, "lock_camera", text="Camera to View")
            # Show the Lock Rotation option on View Properties 
            col.prop(view.region_3d, "lock_rotation", text="Lock Rotation")

I just have added the last 2 lines, the first line is just a comment, and the second one is the one that's adds the "Lock Rotation" check box to your view locking properties (as specified before)

  • Replace the original file.

  • Relaunch Blender

  • Now create a new Workspace, based on General Layout using the little "+" symbol at the top right for the different workspaces, name it as you want. enter image description here

  • Then create 4 views dragging the corners to split the current view in 4 (top, bottom, right, and perspective) and set the new Lock Rotation on the first 3.

enter image description here

  • 1
    $\begingroup$ Suggest instead of editing blenders UI (IMO a slippery slope) define a draw method with the change def draw_lock(self, context): and append it to the panel bpy.types.VIEW3D_PT_view3d_lock.append(draw_lock) $\endgroup$
    – batFINGER
    Commented Dec 3, 2020 at 16:45
  • $\begingroup$ Thanks for a simple script instead of a link leading to the void! $\endgroup$
    – spro
    Commented Jan 22, 2022 at 21:04

Here is an Viewport lock addon, may be the addon is a real decision for Your issue? https://blenderartists.org/t/wlock-an-addon-for-blender-2-8-which-allows-to-lock-3d-view-rotation-using-hotkey-default-alt-w/1163353

This addon allows to lock 3D view rotation (only 3D view) using hotkey. As an additional indicator a 'lock' icon is displayed (can be set up or disabled in Preferences).

  • 1
    $\begingroup$ Hello and welcome. We are looking for answers that give some context and explanation of how and why they work. Could you edit your answer and add a short description of what the addon does and why it works? $\endgroup$ Commented Jun 9, 2019 at 1:00
  • $\begingroup$ This add-on is awesome. Blender should really have such a toggle in the View menu $\endgroup$ Commented Nov 26, 2019 at 9:49

Check out this add on by Jason van Gumster(fweeb)

Described like this:

It locks the 3D View to whatever viewing angle you’re currently using, kind of like the ortho views when you use Quad View… but this works for any arbitrary viewing angle.

[...] I discovered that the feature is actually in the Blender Python API, there’s just no way to access it in the UI.So I fixed that.

  • 1
    $\begingroup$ Link dead 404 not found $\endgroup$ Commented Oct 29, 2018 at 19:06
  • 1
    $\begingroup$ What was the add-on's name? $\endgroup$ Commented Nov 26, 2019 at 9:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .