fix for vert/face mask modes using last used select option when using the select...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 26 Jun 2013 02:57:05 +0000 (02:57 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 26 Jun 2013 02:57:05 +0000 (02:57 +0000)
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/space_view3d/view3d_buttons.c

index df1978c49f65f776ef728e8cebd5fda17bc52c84..2c7824d4a0dcbf90e310568d3627820e1a6cb073 100644 (file)
@@ -1242,7 +1242,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
        /*Weight paint's Vertex Selection Mode */
        keymap = WM_keymap_find(keyconf, "Weight Paint Vertex Selection", 0, 0);
        keymap->poll = vert_paint_poll;
-       WM_keymap_add_item(keymap, "PAINT_OT_vert_select_all", AKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "PAINT_OT_vert_select_all", AKEY, KM_PRESS, 0, 0);
+       RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
        kmi = WM_keymap_add_item(keymap, "PAINT_OT_vert_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
        RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
        WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0);
@@ -1283,7 +1284,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
        keymap = WM_keymap_find(keyconf, "Face Mask", 0, 0);
        keymap->poll = facemask_paint_poll;
 
-       WM_keymap_add_item(keymap, "PAINT_OT_face_select_all", AKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "PAINT_OT_face_select_all", AKEY, KM_PRESS, 0, 0);
+       RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
        kmi = WM_keymap_add_item(keymap, "PAINT_OT_face_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
        RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
        kmi = WM_keymap_add_item(keymap, "PAINT_OT_face_select_hide", HKEY, KM_PRESS, 0, 0);
index 57088bcc315e991a06be5c2bf0e0b355a3fdf6fd..860807946a097192f87410eb6594f74acf0e8d34 100644 (file)
@@ -914,7 +914,7 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa)
                but = uiDefButO_ptr(block, BUT, ot, WM_OP_EXEC_DEFAULT, "Normalize",
                                    0, yco, UI_UNIT_X * 5, UI_UNIT_Y,
                                    TIP_("Normalize weights of active vertex (if affected groups are unlocked"));
-               if(locked) {
+               if (locked) {
                        uiButSetFlag(but, UI_BUT_DISABLED);
                }