Skip to content

Instantly share code, notes, and snippets.

@p2or
Last active May 21, 2023 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save p2or/0969e9981aeec63551e8f0b02e0c7d55 to your computer and use it in GitHub Desktop.
Save p2or/0969e9981aeec63551e8f0b02e0c7d55 to your computer and use it in GitHub Desktop.
Deativate Shift MMB II #Blender
# https://blender.stackexchange.com/q/110742/3710
bl_info = {
"name": "Disable Shift+MMB in 3D Viewport",
"description": "Disable Shift+MMB in 3D Viewport",
"author": "p2or",
"version": (0, 0, 1),
"blender": (2, 79, 0),
"location": "3D View",
"category": "3D View"
}
import bpy
addon_keymaps = []
def register():
# handle the keymap
wm = bpy.context.window_manager
kc = wm.keyconfigs.addon
if kc:
km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)
kmi = km.keymap_items.new('view3d.rotate', type='MIDDLEMOUSE', value='PRESS', shift=True)
addon_keymaps.append((km, kmi))
def unregister():
for km, kmi in addon_keymaps:
km.keymap_items.remove(kmi)
addon_keymaps.clear()
if __name__ == "__main__":
register()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment