code cleanup: mask keys now dont use space-clip keys - could give troubles later on.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 27 Jul 2012 11:56:36 +0000 (11:56 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 27 Jul 2012 11:56:36 +0000 (11:56 +0000)
source/blender/editors/mask/mask_edit.c
source/blender/editors/mask/mask_select.c

index 9ff959c14c1ca5f0839a69bf88e75be687e5b26a..dc41424b1d995dd264d6b2509ac1fab523ebb370 100644 (file)
@@ -497,8 +497,6 @@ void ED_keymap_mask(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "MASK_OT_normals_make_consistent", NKEY, KM_PRESS, KM_CTRL, 0);
        // WM_keymap_add_item(keymap, "MASK_OT_feather_weight_clear", SKEY, KM_PRESS, KM_ALT, 0);
        /* ... matches curve editmode */
-       RNA_enum_set(WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_ALT, 0)->ptr,
-                    "mode", TFM_MASK_SHRINKFATTEN);
 
        /* relationships */
        WM_keymap_add_item(keymap, "MASK_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
@@ -510,7 +508,13 @@ void ED_keymap_mask(wmKeyConfig *keyconf)
        /* for image editor only */
        WM_keymap_add_item(keymap, "UV_OT_cursor_set", ACTIONMOUSE, KM_PRESS, 0, 0);
 
-       transform_keymap_for_space(keyconf, keymap, SPACE_CLIP);
+       /* Transform (don't use transform_keymap_for_space() since this maps to different spaces) */
+       WM_keymap_add_item(keymap, "TRANSFORM_OT_translate", GKEY, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "TRANSFORM_OT_translate", EVT_TWEAK_S, KM_ANY, 0, 0);
+       WM_keymap_add_item(keymap, "TRANSFORM_OT_resize", SKEY, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "TRANSFORM_OT_rotate", RKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_ALT, 0);
+       RNA_enum_set(kmi->ptr, "mode", TFM_MASK_SHRINKFATTEN);
 }
 
 void ED_operatormacros_mask(void)
index 2f5fef1d59a13e55b94be1bd27ff2017b4b13743..81cfbb9b5866c55d7ee4b2b5739015c189b307dd 100644 (file)
@@ -548,7 +548,6 @@ static int clip_lasso_select_exec(bContext *C, wmOperator *op)
        return OPERATOR_PASS_THROUGH;
 }
 
-/* MASKTODO - image space */
 void MASK_OT_select_lasso(wmOperatorType *ot)
 {
        /* identifiers */