From 9ce143ae25bb50d68defab3f768c32e7fd1d54a9 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 16 Nov 2006 23:15:06 +0000 Subject: This commit adds some missing features to markers in action editor, and also fixes some further segfaults. Now it is possible to 'surf' (jump) to different markers. This is only possible through the hotkeys for this: * Page Up - Next Marker * Page Down - Previous Marker These hotkeys match the ones in the timeline. In order to do so, I've had to reassign two (rarely used/obscure) hotkeys: * 'Ctrl Page Up' is now move selected action channel up (was Page Up) * 'Ctrl Page Down' is no move selected action channel down (was Page Down) I should also mention here that * 'Shift Page Up' is move action channel to top * 'Shift Page Down' is move action channel to bottom --- source/blender/src/header_action.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'source/blender/src/header_action.c') diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c index eecfcda1359..27893184c24 100644 --- a/source/blender/src/header_action.c +++ b/source/blender/src/header_action.c @@ -439,8 +439,8 @@ static uiBlock *action_selectmenu(void *arg_unused) "Select Keys Column|K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_SEL_COLUMN, ""); - - /* + +/* uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Keys At Markers|CTRL K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, @@ -450,7 +450,7 @@ static uiBlock *action_selectmenu(void *arg_unused) "Select Keys Between Markers|SHIFT K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_SEL_MARKERS_KEYSBETWEEN, ""); - */ +*/ if(curarea->headertype==HEADERTOP) { uiBlockSetDirection(block, UI_DOWN); @@ -774,11 +774,11 @@ static uiBlock *action_keymenu_chanposmenu(void *arg_unused) uiBlockSetButmFunc(block, do_action_keymenu_chanposmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, - "Move Up|Page Up", 0, yco-=20, + "Move Up|Ctrl Page Up", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_KEY_CHANPOS_MOVE_CHANNEL_UP, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, - "Move Down|Page Down", 0, yco-=20, + "Move Down|Ctrl Page Down", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_KEY_CHANPOS_MOVE_CHANNEL_DOWN, ""); @@ -927,30 +927,30 @@ static uiBlock *action_keymenu(void *arg_unused) static void do_action_markermenu(void *arg, int event) { SpaceAction *saction; - ListBase *lb = NULL; + ListBase *markers = NULL; saction= curarea->spacedata.first; if (!saction) return; /* get set of markers */ - lb= get_saction_markers(saction); - if (lb == NULL) + markers= get_saction_markers(saction); + if (markers == NULL) return; switch(event) { case ACTMENU_MARKERS_ADD: - add_saction_marker(lb, CFRA); + add_saction_marker(markers, CFRA); break; case ACTMENU_MARKERS_DUPLICATE: - duplicate_saction_markers(lb); + duplicate_saction_markers(markers); break; case ACTMENU_MARKERS_DELETE: - remove_saction_markers(lb); + remove_saction_markers(markers); break; case ACTMENU_MARKERS_NAME: - rename_saction_markers(lb); + rename_saction_markers(markers); break; case ACTMENU_MARKERS_MOVE: transform_saction_markers('g', 0); @@ -1075,7 +1075,8 @@ void action_buttons(void) "Key", xco, -2, xmax-3, 24, ""); xco+= xmax; - if (G.saction->markert != SACTION_NOMARKERS) { + if ((G.saction->markert != SACTION_NOMARKERS) && + (G.saction->action != NULL)) { xmax= GetButStringLength("Marker"); uiDefPulldownBut(block, action_markermenu, NULL, "Marker", xco, -2, xmax-3, 24, ""); -- cgit v1.2.3