diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-10-17 15:20:12 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-10-17 15:20:12 +0400 |
commit | 013ffe904176c113a7642aed95b4b691f213d042 (patch) | |
tree | 79371a5fcb011662ce86673987c9fc188e84b9bf /source/blender/editors | |
parent | 6f1783470e249c60b8a96956f2f0ed564efaf107 (diff) |
Bugfix #24296: AutoIK interactive chain length adjustment feature is missing
In 2.49, you could adjust the maximum length of Auto-IK Chains by using scrollwheel up/down or page up/down while moving Auto-IK bones. Now this is possible again with those hotkeys, but you need to hold SHIFT to get this to work, otherwise we get a conflict with the hotkeys for proportional edit nowadays.
Was broken when transform tools switched from using hardcoded key mappings to using a modal keymap.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 4a95d0ec081..ae0bce176c1 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -481,6 +481,8 @@ static void view_editmove(unsigned short UNUSED(event)) * */ #define TFM_MODAL_PROPSIZE_UP 20 #define TFM_MODAL_PROPSIZE_DOWN 21 +#define TFM_MODAL_AUTOIK_LEN_INC 22 +#define TFM_MODAL_AUTOIK_LEN_DEC 23 /* called in transform_ops.c, on each regeneration of keymaps */ wmKeyMap* transform_modal_keymap(wmKeyConfig *keyconf) @@ -507,6 +509,8 @@ wmKeyMap* transform_modal_keymap(wmKeyConfig *keyconf) {NUM_MODAL_INCREMENT_DOWN, "INCREMENT_DOWN", 0, "Numinput Increment Down", ""}, {TFM_MODAL_PROPSIZE_UP, "PROPORTIONAL_SIZE_UP", 0, "Increase Proportional Influence", ""}, {TFM_MODAL_PROPSIZE_DOWN, "PROPORTIONAL_SIZE_DOWN", 0, "Decrease Poportional Influence", ""}, + {TFM_MODAL_AUTOIK_LEN_INC, "AUTOIK_CHAIN_LEN_UP", 0, "Increase Max AutoIK Chain Length", ""}, + {TFM_MODAL_AUTOIK_LEN_DEC, "AUTOIK_CHAIN_LEN_DOWN", 0, "Decrease Max AutoIK Chain Length", ""}, {0, NULL, 0, NULL, NULL}}; wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Transform Modal Map"); @@ -541,7 +545,12 @@ wmKeyMap* transform_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_add_item(keymap, PAGEDOWNKEY, KM_PRESS, 0, 0, TFM_MODAL_PROPSIZE_DOWN); WM_modalkeymap_add_item(keymap, WHEELDOWNMOUSE, KM_PRESS, 0, 0, TFM_MODAL_PROPSIZE_UP); WM_modalkeymap_add_item(keymap, WHEELUPMOUSE, KM_PRESS, 0, 0, TFM_MODAL_PROPSIZE_DOWN); - + + WM_modalkeymap_add_item(keymap, PAGEUPKEY, KM_PRESS, KM_SHIFT, 0, TFM_MODAL_AUTOIK_LEN_INC); + WM_modalkeymap_add_item(keymap, PAGEDOWNKEY, KM_PRESS, KM_SHIFT, 0, TFM_MODAL_AUTOIK_LEN_DEC); + WM_modalkeymap_add_item(keymap, WHEELDOWNMOUSE, KM_PRESS, KM_SHIFT, 0, TFM_MODAL_AUTOIK_LEN_INC); + WM_modalkeymap_add_item(keymap, WHEELUPMOUSE, KM_PRESS, KM_SHIFT, 0, TFM_MODAL_AUTOIK_LEN_DEC); + return keymap; } @@ -735,6 +744,16 @@ int transformEvent(TransInfo *t, wmEvent *event) } t->redraw |= TREDRAW_HARD; break; + case TFM_MODAL_AUTOIK_LEN_INC: + if (t->flag & T_AUTOIK) + transform_autoik_update(t, 1); + t->redraw |= TREDRAW_HARD; + break; + case TFM_MODAL_AUTOIK_LEN_DEC: + if (t->flag & T_AUTOIK) + transform_autoik_update(t, -1); + t->redraw |= TREDRAW_HARD; + break; default: handled = 0; break; |