diff options
author | Chris Want <cwant@ualberta.ca> | 2003-01-28 06:11:27 +0300 |
---|---|---|
committer | Chris Want <cwant@ualberta.ca> | 2003-01-28 06:11:27 +0300 |
commit | 53b540c627a5667b20807fb3d5f88a3f8cb3d018 (patch) | |
tree | ae8678b4c4f8063fd0410bbf7a716f82695be3c3 /source/blender/src/editaction.c | |
parent | 30861557bcbb0054d552dc4f262eb2164cc092d9 (diff) |
Added support for manipulating Ipo bezier handles through
the action window. Selecting action keys and pressing VKEY,
HKEY, or shift-HKEY modifies the handles of the keys in
the same way it does in the IPO window. (suggested by Lyubomir)
Diffstat (limited to 'source/blender/src/editaction.c')
-rw-r--r-- | source/blender/src/editaction.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index 28234042c93..c9ee8c546b4 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -1310,6 +1310,35 @@ static void delete_actionchannels (void) allqueue(REDRAWNLA, 0); } + +static void sethandles_actionchannel_keys(int code) +{ + bAction *act; + bActionChannel *chan; + + /* Get the selected action, exit if none are selected + */ + act = G.saction->action; + if (!act) + return; + + /* Loop through the channels and set the beziers + * of the selected keys based on the integer code + */ + for (chan = act->chanbase.first; chan; chan=chan->next){ + sethandles_ipo_keys(chan->ipo, code); + } + + /* Clean up and redraw stuff + */ + remake_action_ipos (act); + allspace(REMAKEIPO, 0); + allqueue(REDRAWACTION, 0); + allqueue(REDRAWIPO, 0); + allqueue(REDRAWNLA, 0); +} + + void winqreadactionspace(unsigned short event, short val, char ascii) { SpaceAction *saction; @@ -1375,6 +1404,16 @@ void winqreadactionspace(unsigned short event, short val, char ascii) allqueue (REDRAWIPO, 0); } break; + + /*** set the Ipo handles ***/ + case VKEY: + sethandles_actionchannel_keys(HD_VECT); + break; + case HKEY: + if(G.qual & LR_SHIFTKEY) sethandles_actionchannel_keys(HD_AUTO); + else sethandles_actionchannel_keys(HD_ALIGN); + break; + case BKEY: borderselect_action(); break; |