Keymap: correct keymap names
authorCampbell Barton <ideasman42@gmail.com>
Fri, 14 Dec 2018 01:17:00 +0000 (12:17 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 14 Dec 2018 01:17:00 +0000 (12:17 +1100)
Generated names include the current context mode
which is irrelevant for generic 3D view tools.

release/scripts/presets/keyconfig/keymap_data/blender_default.py
release/scripts/startup/bl_ui/space_toolsystem_toolbar.py

index 98f0190975b79fa2e5e645c5b6c47f4348d39cb6..13f68743b01dfebfe781c1cea9cfd626751122ab 100644 (file)
@@ -5100,9 +5100,9 @@ def km_node_editor_tool_links_cut(params):
 
 
 
-def km_3d_view_tool_object_cursor(params):
+def km_3d_view_tool_cursor(params):
     return (
-        "3D View Tool: Object, Cursor",
+        "3D View Tool: Cursor",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
         {"items": [
             ("view3d.cursor3d", {"type": params.tool_mouse, "value": 'PRESS'}, None),
@@ -5112,25 +5112,25 @@ def km_3d_view_tool_object_cursor(params):
     )
 
 
-def km_3d_view_tool_object_select(params):
+def km_3d_view_tool_select(params):
     return (
-        "3D View Tool: Object, Select",
+        "3D View Tool: Select",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
         {"items": _template_items_tool_select(params, "view3d.select", "view3d.cursor3d")},
     )
 
 
-def km_3d_view_tool_object_select_box(params):
+def km_3d_view_tool_select_box(params):
     return (
-        "3D View Tool: Object, Select Box",
+        "3D View Tool: Select Box",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
         {"items": _template_items_tool_select_actions("view3d.select_box", type=params.tool_tweak, value='ANY')},
     )
 
 
-def km_3d_view_tool_object_select_circle(params):
+def km_3d_view_tool_select_circle(params):
     return (
-        "3D View Tool: Object, Select Circle",
+        "3D View Tool: Select Circle",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
         {"items": [
             ("view3d.select_circle", {"type": params.tool_mouse, "value": 'PRESS'},
@@ -5141,17 +5141,17 @@ def km_3d_view_tool_object_select_circle(params):
     )
 
 
-def km_3d_view_tool_object_select_lasso(params):
+def km_3d_view_tool_select_lasso(params):
     return (
-        "3D View Tool: Object, Select Lasso",
+        "3D View Tool: Select Lasso",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
         {"items": _template_items_tool_select_actions("view3d.select_lasso", type=params.tool_tweak, value='ANY')},
     )
 
 
-def km_3d_view_tool_object_transform(params):
+def km_3d_view_tool_transform(params):
     return (
-        "3D View Tool: Object, Transform",
+        "3D View Tool: Transform",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
         {"items": [
             ("transform.from_gizmo", {"type": params.tool_tweak, "value": 'ANY'}, None),
@@ -5159,9 +5159,9 @@ def km_3d_view_tool_object_transform(params):
     )
 
 
-def km_3d_view_tool_object_move(params):
+def km_3d_view_tool_move(params):
     return (
-        "3D View Tool: Object, Move",
+        "3D View Tool: Move",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
         {"items": [
             ("transform.translate", {"type": params.tool_tweak, "value": 'ANY'},
@@ -5170,9 +5170,9 @@ def km_3d_view_tool_object_move(params):
     )
 
 
-def km_3d_view_tool_object_rotate(params):
+def km_3d_view_tool_rotate(params):
     return (
-        "3D View Tool: Object, Rotate",
+        "3D View Tool: Rotate",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
         {"items": [
             ("transform.rotate", {"type": params.tool_tweak, "value": 'ANY'},
@@ -5181,9 +5181,9 @@ def km_3d_view_tool_object_rotate(params):
     )
 
 
-def km_3d_view_tool_object_scale(params):
+def km_3d_view_tool_scale(params):
     return (
-        "3D View Tool: Object, Scale",
+        "3D View Tool: Scale",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
         {"items": [
             ("transform.resize", {"type": params.tool_tweak, "value": 'ANY'},
@@ -5192,9 +5192,9 @@ def km_3d_view_tool_object_scale(params):
     )
 
 
-def km_3d_view_tool_object_measure(params):
+def km_3d_view_tool_measure(params):
     return (
-        "3D View Tool: Object, Measure",
+        "3D View Tool: Measure",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
         {"items": [
             ("view3d.ruler_add", {"type": params.tool_tweak, "value": 'ANY'}, None),
@@ -5928,16 +5928,16 @@ def generate_keymaps(params=None):
         km_node_editor_tool_select_box(params),
         km_node_editor_tool_select_lasso(params),
         km_node_editor_tool_links_cut(params),
-        km_3d_view_tool_object_cursor(params),
-        km_3d_view_tool_object_select(params),
-        km_3d_view_tool_object_select_box(params),
-        km_3d_view_tool_object_select_circle(params),
-        km_3d_view_tool_object_select_lasso(params),
-        km_3d_view_tool_object_transform(params),
-        km_3d_view_tool_object_move(params),
-        km_3d_view_tool_object_rotate(params),
-        km_3d_view_tool_object_scale(params),
-        km_3d_view_tool_object_measure(params),
+        km_3d_view_tool_cursor(params),
+        km_3d_view_tool_select(params),
+        km_3d_view_tool_select_box(params),
+        km_3d_view_tool_select_circle(params),
+        km_3d_view_tool_select_lasso(params),
+        km_3d_view_tool_transform(params),
+        km_3d_view_tool_move(params),
+        km_3d_view_tool_rotate(params),
+        km_3d_view_tool_scale(params),
+        km_3d_view_tool_measure(params),
         km_3d_view_tool_pose_breakdowner(params),
         km_3d_view_tool_pose_push(params),
         km_3d_view_tool_pose_relax(params),
index 5c930b68dd9a88e9a2d73720066fc9516788e41d..2bc5e41b03c41f9f8c6a95f028e0d6a557419e66 100644 (file)
@@ -78,7 +78,7 @@ class _defs_view3d_generic:
                 "Set the cursor location, drag to transform"
             ),
             icon="ops.generic.cursor",
-            keymap=(),
+            keymap="3D View Tool: Cursor",
             draw_settings=draw_settings,
         )
 
@@ -108,7 +108,7 @@ class _defs_view3d_generic:
             description=description,
             icon="ops.view3d.ruler",
             widget="VIEW3D_GGT_ruler",
-            keymap=(),
+            keymap="3D View Tool: Measure",
         )
 
 
@@ -208,7 +208,7 @@ class _defs_transform:
             icon="ops.transform.translate",
             widget="TRANSFORM_GGT_gizmo",
             operator="transform.translate",
-            keymap=(),
+            keymap="3D View Tool: Move",
         )
 
     @ToolDef.from_fn
@@ -219,7 +219,7 @@ class _defs_transform:
             icon="ops.transform.rotate",
             widget="TRANSFORM_GGT_gizmo",
             operator="transform.rotate",
-            keymap=(),
+            keymap="3D View Tool: Rotate",
         )
 
     @ToolDef.from_fn
@@ -230,7 +230,7 @@ class _defs_transform:
             icon="ops.transform.resize",
             widget="TRANSFORM_GGT_gizmo",
             operator="transform.resize",
-            keymap=(),
+            keymap="3D View Tool: Scale",
         )
 
     @ToolDef.from_fn
@@ -259,7 +259,7 @@ class _defs_transform:
             ),
             icon="ops.transform.transform",
             widget="TRANSFORM_GGT_gizmo",
-            keymap=(),
+            keymap="3D View Tool: Transform",
             draw_settings=draw_settings,
         )
 
@@ -274,7 +274,7 @@ class _defs_view3d_select:
             text="Select",
             icon="ops.generic.select",
             widget=None,
-            keymap=(),
+            keymap="3D View Tool: Select",
             draw_settings=draw_settings,
         )
 
@@ -287,7 +287,7 @@ class _defs_view3d_select:
             text="Select Box",
             icon="ops.generic.select_box",
             widget=None,
-            keymap=(),
+            keymap="3D View Tool: Select Box",
             draw_settings=draw_settings,
         )
 
@@ -320,7 +320,7 @@ class _defs_view3d_select:
             text="Select Circle",
             icon="ops.generic.select_circle",
             widget=None,
-            keymap=(),
+            keymap="3D View Tool: Select Circle",
             draw_settings=draw_settings,
             draw_cursor=draw_cursor,
         )
@@ -993,7 +993,7 @@ class _defs_image_uv_select:
             text="Select Lasso",
             icon="ops.generic.select_lasso",
             widget=None,
-            keymap=(),
+            keymap="3D View Tool: Select Lasso",
             draw_settings=draw_settings,
         )