Last active
May 21, 2023 19:15
-
-
Save p2or/0969e9981aeec63551e8f0b02e0c7d55 to your computer and use it in GitHub Desktop.
Deativate Shift MMB II #Blender
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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