[Bf-extensions-cvs] [41d528d7] blender2.8: Updates for keymap changes.

Brecht Van Lommel noreply at git.blender.org
Fri Nov 23 15:02:36 CET 2018


Commit: 41d528d76b99e689e09915f5dcd589480579ef3a
Author: Brecht Van Lommel
Date:   Fri Nov 23 14:53:14 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBAC41d528d76b99e689e09915f5dcd589480579ef3a

Updates for keymap changes.

===================================================================

M	animation_motion_trail.py
M	mesh_ktools.py
M	space_view3d_enhanced_3d_cursor.py
M	space_view3d_quickPrefs.py

===================================================================

diff --git a/animation_motion_trail.py b/animation_motion_trail.py
index 4d69d2bc..d5598c2e 100644
--- a/animation_motion_trail.py
+++ b/animation_motion_trail.py
@@ -1363,7 +1363,10 @@ class MotionTrailOperator(bpy.types.Operator):
             context.area.tag_redraw()
             return {'PASS_THROUGH'}
 
-        select = context.user_preferences.inputs.select_mouse
+        wm = context.window_manager
+        keyconfig = wm.keyconfigs.active
+        select = getattr(keyconfig.preferences, "select_mouse", "LEFT")
+
         if (not context.active_object or
                 context.active_object.mode not in ('OBJECT', 'POSE')):
             if self.drag:
@@ -1528,7 +1531,9 @@ class MotionTrailOperator(bpy.types.Operator):
             return {'CANCELLED'}
 
         # get clashing keymap items
-        select = context.user_preferences.inputs.select_mouse
+        wm = context.window_manager
+        keyconfig = wm.keyconfigs.active
+        select = getattr(keyconfig.preferences, "select_mouse", "LEFT")
         kms = [
             bpy.context.window_manager.keyconfigs.active.keymaps['3D View'],
             bpy.context.window_manager.keyconfigs.active.keymaps['Object Mode']
diff --git a/mesh_ktools.py b/mesh_ktools.py
index 58444fd1..5b7a6246 100644
--- a/mesh_ktools.py
+++ b/mesh_ktools.py
@@ -2482,7 +2482,7 @@ def register():
         if kc:
             # Add paint select to CTRL+SHIFT+ALT+LeftMouse
             km = kc.keymaps.new(name="3D View", space_type="VIEW_3D")
-            kmi = km.keymap_items.new('view3d.select_paint', 'ACTIONMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
+            kmi = km.keymap_items.new('view3d.select_paint', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
 
 
 
diff --git a/space_view3d_enhanced_3d_cursor.py b/space_view3d_enhanced_3d_cursor.py
index b23ab35b..5d0c0ac5 100644
--- a/space_view3d_enhanced_3d_cursor.py
+++ b/space_view3d_enhanced_3d_cursor.py
@@ -343,6 +343,8 @@ class EnhancedSetCursor(bpy.types.Operator):
     def setup_keymaps(self, context, event=None):
         self.key_map = self.key_map.copy()
 
+        wm = context.window_manager
+
         # There is no such event as 'ACTIONMOUSE',
         # it's always 'LEFTMOUSE' or 'RIGHTMOUSE'
         if event:
@@ -355,7 +357,8 @@ class EnhancedSetCursor(bpy.types.Operator):
             else:
                 event = None
         if event is None:
-            select_mouse = context.user_preferences.inputs.select_mouse
+            keyconfig = wm.keyconfigs.active
+            select_mouse = getattr(keyconfig.preferences, "select_mouse", "LEFT")
             if select_mouse == 'RIGHT':
                 self.key_map["confirm"] = {'LEFTMOUSE'}
                 self.key_map["cancel"] = {'RIGHTMOUSE', 'ESC'}
@@ -364,7 +367,6 @@ class EnhancedSetCursor(bpy.types.Operator):
                 self.key_map["cancel"] = {'LEFTMOUSE', 'ESC'}
 
         # Use user-defined "free mouse" key, if it exists
-        wm = context.window_manager
         if '3D View' in wm.keyconfigs.user.keymaps:
             km = wm.keyconfigs.user.keymaps['3D View']
             for kmi in KeyMapItemSearch(EnhancedSetCursor.bl_idname, km):
diff --git a/space_view3d_quickPrefs.py b/space_view3d_quickPrefs.py
index f084cf1c..90a2d2a6 100644
--- a/space_view3d_quickPrefs.py
+++ b/space_view3d_quickPrefs.py
@@ -832,12 +832,6 @@ class PANEL(bpy.types.Panel):
 
 
         if scn.interface:
-            #Select with
-            boxrow=box.row()
-            boxrow.label(text="Select With:")
-            boxrow=box.row()
-            boxrow.prop(inputs, "select_mouse", expand=True)
-
             #Orbit
             boxrow=box.row()
             boxrow.label(text="Orbit Style:")



More information about the Bf-extensions-cvs mailing list