INNER CODE UNIT · Python

update_rebind_switch_nav_rotate

SpectralVectors/RightMouseNavigation · preferences.py:84

def update_rebind_switch_nav_rotate(self, context):    
    wm = context.window_manager
    active_keyconfig = wm.keyconfigs.active
    addon_keyconfig = wm.keyconfigs.addon
    blender_keyconfig = wm.keyconfigs["Blender"]
    user_keyconfig = wm.keyconfigs["Blender user"]

    try:
        self.rebind_switch_nav_rotate(active_keyconfig, addon_keyconfig, self.rmb_rotate_switch)
    except KeyError:
        self.rebind_switch_nav_rotate(blender_keyconfig, addon_keyconfig, self.rmb_rotate_switch)
    except KeyError:
        self.rebind_switch_nav_rotate(user_keyconfig, addon_keyconfig, self.rmb_rotate_switch)


class RightMouseNavigationPreferences(AddonPreferences):
    bl_idname = __package__

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…