Fix T54323: Improve Paint category names in keymap preferences
authorPhilipp Oeser <info@graphics-engineer.com>
Mon, 10 Feb 2020 11:13:55 +0000 (12:13 +0100)
committerPhilipp Oeser <info@graphics-engineer.com>
Thu, 27 Feb 2020 09:11:23 +0000 (10:11 +0100)
While one issue of the report was fixed already (rB27adc4aa3347), still a
couple of clarifications could be made:
- correct/clarify which modes these apply to
- clarify that "Face Mask" is a paint thing

Maniphest Tasks: T54323

Differential Revision: https://developer.blender.org/D6797

release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py
release/scripts/presets/keyconfig/keymap_data/blender_default.py
release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/windowmanager/intern/wm_keymap_utils.c

index a98fa2c1fa8b2a29f87c25fa9af811a68b9f9a7e..35b5f2172473dde647de7a5abdabc6b9580b08e2 100644 (file)
@@ -95,8 +95,8 @@ _km_hierarchy = [
         ('Weight Paint', 'EMPTY', 'WINDOW', [
             _km_expand_from_toolsystem('VIEW_3D', 'PAINT_WEIGHT'),
         ]),
-        ('Weight Paint Vertex Selection', 'EMPTY', 'WINDOW', []),
-        ('Face Mask', 'EMPTY', 'WINDOW', []),
+        ('Paint Vertex Selection (Weight, Vertex)', 'EMPTY', 'WINDOW', []),
+        ('Paint Face Mask (Weight, Vertex, Texture)', 'EMPTY', 'WINDOW', []),
         # image and view3d
         ('Image Paint', 'EMPTY', 'WINDOW', [
             _km_expand_from_toolsystem('VIEW_3D', 'PAINT_TEXTURE'),
index 6d67c02a49cac355c4948644692b6d782f14b226..aa061060ef9af551f37bef0c6a02dcfa25f246da 100644 (file)
@@ -3380,7 +3380,7 @@ def km_grease_pencil_stroke_weight_mode(_params):
 def km_face_mask(params):
     items = []
     keymap = (
-        "Face Mask",
+        "Paint Face Mask (Weight, Vertex, Texture)",
         {"space_type": 'EMPTY', "region_type": 'WINDOW'},
         {"items": items},
     )
@@ -3405,7 +3405,7 @@ def km_face_mask(params):
 def km_weight_paint_vertex_selection(params):
     items = []
     keymap = (
-        "Weight Paint Vertex Selection",
+        "Paint Vertex Selection (Weight, Vertex)",
         {"space_type": 'EMPTY', "region_type": 'WINDOW'},
         {"items": items},
     )
index 0195232a59dde05b7abf1af5a48fc2a8656ad134..b0b7c542df315b8a5fcc728d4263f520be2ea73a 100644 (file)
@@ -2531,7 +2531,7 @@ def km_grease_pencil_stroke_weight_mode(params):
 def km_face_mask(params):
     items = []
     keymap = (
-        "Face Mask",
+        "Paint Face Mask (Weight, Vertex, Texture)",
         {"space_type": 'EMPTY', "region_type": 'WINDOW'},
         {"items": items},
     )
@@ -2558,7 +2558,7 @@ def km_face_mask(params):
 def km_weight_paint_vertex_selection(params):
     items = []
     keymap = (
-        "Weight Paint Vertex Selection",
+        "Paint Vertex Selection (Weight, Vertex)",
         {"space_type": 'EMPTY', "region_type": 'WINDOW'},
         {"items": items},
     )
index 8c8fc412663e4bf0f3a025bf1d7171fd691ad8b8..e58183bfc0f7561a7264f35ea73ef8919f072cc3 100644 (file)
@@ -1062,7 +1062,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
   keymap->poll = weight_paint_mode_poll;
 
   /*Weight paint's Vertex Selection Mode */
-  keymap = WM_keymap_ensure(keyconf, "Weight Paint Vertex Selection", 0, 0);
+  keymap = WM_keymap_ensure(keyconf, "Paint Vertex Selection (Weight, Vertex)", 0, 0);
   keymap->poll = vert_paint_poll;
 
   /* Image/Texture Paint mode */
@@ -1070,7 +1070,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
   keymap->poll = image_texture_paint_poll;
 
   /* face-mask mode */
-  keymap = WM_keymap_ensure(keyconf, "Face Mask", 0, 0);
+  keymap = WM_keymap_ensure(keyconf, "Paint Face Mask (Weight, Vertex, Texture)", 0, 0);
   keymap->poll = facemask_paint_poll;
 
   /* paint stroke */
index 9d84309d222d784bcec382fdd4a9f9cb17b2c254..df743415fece13d696f4e9123bd4be22f7bcd344 100644 (file)
@@ -361,10 +361,10 @@ static void view3d_main_region_init(wmWindowManager *wm, ARegion *ar)
   /* object ops. */
 
   /* important to be before Pose keymap since they can both be enabled at once */
-  keymap = WM_keymap_ensure(wm->defaultconf, "Face Mask", 0, 0);
+  keymap = WM_keymap_ensure(wm->defaultconf, "Paint Face Mask (Weight, Vertex, Texture)", 0, 0);
   WM_event_add_keymap_handler(&ar->handlers, keymap);
 
-  keymap = WM_keymap_ensure(wm->defaultconf, "Weight Paint Vertex Selection", 0, 0);
+  keymap = WM_keymap_ensure(wm->defaultconf, "Paint Vertex Selection (Weight, Vertex)", 0, 0);
   WM_event_add_keymap_handler(&ar->handlers, keymap);
 
   /* Before 'Pose' so weight paint menus aren't overridden by pose menus. */
index 4603f14729d42d0da6ce0b87ac231d8f0e97b9b9..5e6b55a508e66f6afec7a74be016e42dfb98e399 100644 (file)
@@ -318,7 +318,7 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname)
   }
   /* Paint Face Mask */
   else if (STRPREFIX(opname, "PAINT_OT_face_select")) {
-    km = WM_keymap_find_all(C, "Face Mask", 0, 0);
+    km = WM_keymap_find_all(C, "Paint Face Mask (Weight, Vertex, Texture)", 0, 0);
   }
   else if (STRPREFIX(opname, "PAINT_OT")) {
     /* check for relevant mode */