Middle-Click to constrain Transform Axis not working (2.91 and up)

I don’t use the X Y Z keys much while transforming in blender, instead I always used to use the Middle Click to lock the axis of Move, Rotate or Scale. This feature seems to be broken for me in 2.91 and 2.92. I looked through the hotkeys and settings but didn’t find a way to fix it. Does anyone know anything about this issue? Thanks.

Broken how? Like this?

No, for me middle mouse literally does nothing.

Hmm. Perhaps you could try a later 2.92 build once it picks up the fix and see if it works for your case as well? If it doesn’t, then it’d be a good idea to post a fresh bug report.

It works for me with 2.91 W10 x64.

In your custom keymappings for 2.91 you’re probably missing

    ("AUTOCONSTRAIN", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None),
    ("AUTOCONSTRAINPLANE", {"type": 'MIDDLEMOUSE', "value": 'PRESS', "shift": True}, None),

Under “Transform Modal Map”

This bug entry https://developer.blender.org/D6454#change-nTKSWVM9jo4m
shows some of the history on this, seems at some point MMB was hardcoded for axis constraint and they moved it to being a user customizable key, I’ve had this happen with other mappings in previous versions, your old modified key config that you migrate over to a new version doesn’t contain the new updated data. This change probably didn’t kick in until 2.91 juding by the bug entry.

So, if you tack on those missing lines to your keymappings under this section, your file should look something like this below:

 ("Transform Modal Map",
  {"space_type": 'EMPTY', "region_type": 'WINDOW', "modal": True},
  {"items":
   [("CONFIRM", {"type": 'LEFTMOUSE', "value": 'PRESS', "any": True}, None),
    ("CONFIRM", {"type": 'RET', "value": 'PRESS', "any": True}, None),
    ("CONFIRM", {"type": 'NUMPAD_ENTER', "value": 'PRESS', "any": True}, None),
    ("CANCEL", {"type": 'RIGHTMOUSE', "value": 'PRESS', "any": True}, None),
    ("CANCEL", {"type": 'ESC', "value": 'PRESS', "any": True}, None),
    ("AXIS_X", {"type": 'X', "value": 'PRESS'}, None),
    ("AXIS_Y", {"type": 'Y', "value": 'PRESS'}, None),
    ("AXIS_Z", {"type": 'Z', "value": 'PRESS'}, None),
    ("PLANE_X", {"type": 'X', "value": 'PRESS', "shift": True}, None),
    ("PLANE_Y", {"type": 'Y', "value": 'PRESS', "shift": True}, None),
    ("PLANE_Z",
     {"type": 'Z', "value": 'PRESS', "shift": True},
     {    "active":False,
      },
     ),
    ("CONS_OFF", {"type": 'C', "value": 'PRESS'}, None),
    ("TRANSLATE", {"type": 'G', "value": 'PRESS'}, None),
    ("ROTATE", {"type": 'R', "value": 'PRESS'}, None),
    ("RESIZE", {"type": 'S', "value": 'PRESS'}, None),
    ("SNAP_TOGGLE", {"type": 'TAB', "value": 'PRESS', "shift": True}, None),
    ("SNAP_INV_ON", {"type": 'LEFT_CTRL', "value": 'PRESS', "any": True}, None),
    ("SNAP_INV_OFF", {"type": 'LEFT_CTRL', "value": 'RELEASE', "any": True}, None),
    ("SNAP_INV_ON", {"type": 'RIGHT_CTRL', "value": 'PRESS', "any": True}, None),
    ("SNAP_INV_OFF", {"type": 'RIGHT_CTRL', "value": 'RELEASE', "any": True}, None),
    ("ADD_SNAP", {"type": 'A', "value": 'PRESS'}, None),
    ("REMOVE_SNAP", {"type": 'A', "value": 'PRESS', "alt": True}, None),
    ("PROPORTIONAL_SIZE_UP", {"type": 'PAGE_UP', "value": 'PRESS'}, None),
    ("PROPORTIONAL_SIZE_DOWN", {"type": 'PAGE_DOWN', "value": 'PRESS'}, None),
    ("PROPORTIONAL_SIZE_UP", {"type": 'PAGE_UP', "value": 'PRESS', "shift": True}, None),
    ("PROPORTIONAL_SIZE_DOWN", {"type": 'PAGE_DOWN', "value": 'PRESS', "shift": True}, None),
    ("PROPORTIONAL_SIZE_UP", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS'}, None),
    ("PROPORTIONAL_SIZE_DOWN", {"type": 'WHEELUPMOUSE', "value": 'PRESS'}, None),
    ("PROPORTIONAL_SIZE_UP", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "shift": True}, None),
    ("PROPORTIONAL_SIZE_DOWN", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "shift": True}, None),
    ("PROPORTIONAL_SIZE", {"type": 'TRACKPADPAN', "value": 'ANY'}, None),
    ("EDGESLIDE_EDGE_NEXT", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "alt": True}, None),
    ("EDGESLIDE_PREV_NEXT", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "alt": True}, None),
    ("AUTOIK_CHAIN_LEN_UP", {"type": 'PAGE_UP', "value": 'PRESS', "shift": True}, None),
    ("AUTOIK_CHAIN_LEN_DOWN", {"type": 'PAGE_DOWN', "value": 'PRESS', "shift": True}, None),
    ("AUTOIK_CHAIN_LEN_UP", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "shift": True}, None),
    ("AUTOIK_CHAIN_LEN_DOWN", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "shift": True}, None),
    ("INSERTOFS_TOGGLE_DIR", {"type": 'T', "value": 'PRESS'}, None), 
    ("AUTOCONSTRAIN", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None),
    ("AUTOCONSTRAINPLANE", {"type": 'MIDDLEMOUSE', "value": 'PRESS', "shift": True}, None),
1 Like

I had the same issue and added the commands directly in Blender (im/exporting keymaps always seemed to break things for me).

3 Likes

thank you so much, youre a great person for posting this.

1 Like

ledged…wanted this for ages

Has anyone noticed, though, that it doesn’t work quite as well as it used to? I think it used to not re-constrain it if you got close to the starting point of the transform command. Now it’s kind of more janky… Hmm…

1 Like

It does switch the constrain axis far more easily than it used to, yes. I found this to be annoying too, especially when aligning vertices to others on one perticular axis.Feels like being educated to use the axis keys instead of MMB.

had the same issue and this fixed it, thanks!