diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/include/BIF_editaction.h | 6 | ||||
-rw-r--r-- | source/blender/src/editaction.c | 9 | ||||
-rw-r--r-- | source/blender/src/header_action.c | 41 |
3 files changed, 40 insertions, 16 deletions
diff --git a/source/blender/include/BIF_editaction.h b/source/blender/include/BIF_editaction.h index e1825416e3f..ce744b2b3b3 100644 --- a/source/blender/include/BIF_editaction.h +++ b/source/blender/include/BIF_editaction.h @@ -84,14 +84,16 @@ void clean_actionchannels(struct bAction *act); /* Marker Operations */ struct ListBase *get_saction_markers(struct SpaceAction *saction); +struct TimeMarker *find_nearest_saction_marker(struct ListBase *markers); void add_saction_marker(struct ListBase *markers, int frame); void duplicate_saction_markers(struct ListBase *markers); void remove_saction_markers(struct ListBase *markers); void rename_saction_markers(struct ListBase *markers); void transform_saction_markers(int mode, int smode); -void deselect_saction_markers(struct ListBase *markers, int test, int selectmode); +void deselect_saction_markers(struct ListBase *markers, int test, int sel); void borderselect_saction_markers(struct ListBase *markers, float xmin, float xmax, int selectmode); -struct TimeMarker *find_nearest_saction_marker(struct ListBase *markers); +void selectkeyscolumns_saction_markers(struct ListBase *markers); +void selectkeysbetween_saction_markers(struct ListBase *markers); /* channel/strip operations */ void up_sel_action(void); diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index deb3ed6c18f..921478971e0 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -3109,6 +3109,9 @@ TimeMarker *find_nearest_saction_marker(ListBase *markers) rctf rectf; short mval[2]; + if (markers == NULL) + return NULL; + getmouseco_areawin (mval); mval[0]-=7; @@ -3137,10 +3140,10 @@ void deselect_saction_markers(ListBase *markers, int test, int sel) if (test) { /* dependant on existing selection */ /* determine if select all or deselect all */ - sel = 0; + sel = 1; for (marker= markers->first; marker; marker= marker->next) { - if ((marker->flag & SELECT)==0) { - sel = 1; + if (marker->flag & SELECT) { + sel = 0; break; } } diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c index 4cb3dc27bd2..eecfcda1359 100644 --- a/source/blender/src/header_action.c +++ b/source/blender/src/header_action.c @@ -85,11 +85,13 @@ #define ACTMENU_VIEW_LOCK 6 #define ACTMENU_VIEW_SLIDERS 7 -#define ACTMENU_SEL_BORDER 0 -#define ACTMENU_SEL_ALL_KEYS 1 -#define ACTMENU_SEL_ALL_CHAN 2 -#define ACTMENU_SEL_COLUMN 3 -#define ACTMENU_SEL_ALL_MARKERS 4 +#define ACTMENU_SEL_BORDER 0 +#define ACTMENU_SEL_ALL_KEYS 1 +#define ACTMENU_SEL_ALL_CHAN 2 +#define ACTMENU_SEL_COLUMN 3 +#define ACTMENU_SEL_ALL_MARKERS 4 +#define ACTMENU_SEL_MARKERS_KEYSBETWEEN 5 +#define ACTMENU_SEL_MARKERS_KEYSCOLUMN 6 #define ACTMENU_KEY_DUPLICATE 0 #define ACTMENU_KEY_DELETE 1 @@ -379,10 +381,6 @@ static void do_action_selectmenu(void *arg, int event) allqueue(REDRAWNLA, 0); allqueue (REDRAWIPO, 0); break; - - case ACTMENU_SEL_COLUMN: - addqueue (curarea->win, KKEY, 1); - break; case ACTMENU_SEL_ALL_MARKERS: /* select/deselect all markers */ if (markers != NULL) { @@ -391,6 +389,16 @@ static void do_action_selectmenu(void *arg, int event) allqueue(REDRAWTIME, 0); } break; + + case ACTMENU_SEL_COLUMN: /* select column */ + addqueue (curarea->win, KKEY, 1); + break; + + case ACTMENU_SEL_MARKERS_KEYSBETWEEN: /* keys between 2 extreme selected markers */ + break; + + case ACTMENU_SEL_MARKERS_KEYSCOLUMN: /* keys on same frame as marker(s) */ + break; } } @@ -428,10 +436,21 @@ static uiBlock *action_selectmenu(void *arg_unused) menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, - "Select Column|K", 0, yco-=20, + "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, + ACTMENU_SEL_MARKERS_KEYSCOLUMN, ""); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, + "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); |