diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/include/BSE_time.h | 5 | ||||
-rw-r--r-- | source/blender/src/editaction.c | 18 | ||||
-rw-r--r-- | source/blender/src/editipo_mods.c | 5 | ||||
-rw-r--r-- | source/blender/src/editnla.c | 36 | ||||
-rw-r--r-- | source/blender/src/editsound.c | 10 | ||||
-rw-r--r-- | source/blender/src/edittime.c | 72 | ||||
-rw-r--r-- | source/blender/src/header_action.c | 28 | ||||
-rw-r--r-- | source/blender/src/header_ipo.c | 10 | ||||
-rw-r--r-- | source/blender/src/header_nla.c | 8 | ||||
-rw-r--r-- | source/blender/src/header_sound.c | 2 | ||||
-rw-r--r-- | source/blender/src/header_time.c | 2 | ||||
-rw-r--r-- | source/blender/src/space.c | 9 |
12 files changed, 99 insertions, 106 deletions
diff --git a/source/blender/include/BSE_time.h b/source/blender/include/BSE_time.h index b842da8015a..dfae47d2133 100644 --- a/source/blender/include/BSE_time.h +++ b/source/blender/include/BSE_time.h @@ -41,15 +41,12 @@ void duplicate_marker(void); void remove_marker(void); void rename_marker(void); void transform_markers(int mode, int smode); +void borderselect_markers(void); void deselect_markers(short test, short sel); -void borderselect_markers(float xmin, float xmax, int selectmode); struct TimeMarker *find_nearest_marker(int clip_y); void nextprev_marker(short dir); /* ******** Markers - Space Specific ************* */ -/* TimeLine Marker Stuff ----------------------------------- */ -void borderselect_timeline_markers(void); -/* Other Space Marker Stuff ----------------------------- */ void draw_markers_timespace(struct View2D *v2d); /* *********** TimeLine Specific ***************/ diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index 1bb3bea4aa8..54f5d041c2b 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -778,9 +778,6 @@ void borderselect_action(void) mval[0]= rect.xmax; mval[1]= rect.ymax-2; areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); - - /* do markers first */ - borderselect_markers(rectf.xmin, rectf.xmax, selectmode); /* if action is mapped in NLA, it returns a correction */ if(G.saction->pin==0 && OBACT) { @@ -815,11 +812,9 @@ void borderselect_action(void) } BIF_undo_push("Border Select Action"); - allqueue(REDRAWTIME, 0); allqueue(REDRAWIPO, 0); allqueue(REDRAWACTION, 0); allqueue(REDRAWNLA, 0); - allqueue(REDRAWSOUND, 0); } } @@ -863,9 +858,6 @@ void borderselect_mesh(Key *key) adrcodemin = get_nearest_key_num(key, mval, &xmax); adrcodemin = (adrcodemin < 1) ? 1 : adrcodemin; - /* do markers first */ - borderselect_markers(rect.xmin, rect.xmax, selectmode); - /* Lets loop throug the IpoCurves and do borderselect * on the curves with adrcodes in our selected range. */ @@ -883,11 +875,9 @@ void borderselect_mesh(Key *key) /* redraw stuff */ BIF_undo_push("Border select Action Key"); - allqueue(REDRAWTIME, 0); allqueue(REDRAWIPO, 0); allqueue(REDRAWACTION, 0); allqueue(REDRAWNLA, 0); - allqueue(REDRAWSOUND, 0); } } @@ -2518,7 +2508,9 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt) break; case BKEY: - if (key) { + if (G.qual & LR_CTRLKEY) + borderselect_markers(); + else if (key) { if (mval[0]<ACTWIDTH){ /* to do?? */ } @@ -2588,7 +2580,7 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt) break; case GKEY: - if (G.qual & LR_SHIFTKEY) { + if (G.qual & LR_CTRLKEY) { transform_markers('g', 0); } else { @@ -2638,7 +2630,7 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt) /* marker operations */ if (G.qual == 0) add_marker(CFRA); - else if (G.qual == LR_SHIFTKEY) + else if (G.qual == LR_CTRLKEY) rename_marker(); else break; diff --git a/source/blender/src/editipo_mods.c b/source/blender/src/editipo_mods.c index 9b8c64d4c36..822b085e734 100644 --- a/source/blender/src/editipo_mods.c +++ b/source/blender/src/editipo_mods.c @@ -773,9 +773,6 @@ void borderselect_ipo(void) mval[1]= rect.ymax; areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); - /* do markers first */ - borderselect_markers(rectf.xmin, rectf.xmax, val); - if(G.sipo->showkey) { ik= G.sipo->ipokey.first; while(ik) { @@ -816,11 +813,9 @@ void borderselect_ipo(void) } } BIF_undo_push("Border select Ipo"); - allqueue(REDRAWTIME, 0); allqueue(REDRAWIPO, 0); allqueue(REDRAWACTION, 0); allqueue(REDRAWNLA, 0); - allqueue(REDRAWSOUND, 0); } } diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c index 2e3cf1a4242..d8124facf27 100644 --- a/source/blender/src/editnla.c +++ b/source/blender/src/editnla.c @@ -1086,9 +1086,6 @@ void borderselect_nla(void) mval[1]= rect.ymax-2; areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); - /* do markers first */ - borderselect_markers(rectf.xmin, rectf.xmax, selectmode); - ymax = count_nla_levels(); ymax*= (NLACHANNELHEIGHT+NLACHANNELSKIP); ymax+= (NLACHANNELHEIGHT+NLACHANNELSKIP)/2; @@ -1714,17 +1711,19 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt) break; case BKEY: - if (G.qual & LR_SHIFTKEY){ - bake_all_to_action(); - allqueue (REDRAWNLA, 0); - allqueue (REDRAWVIEW3D, 0); - BIF_undo_push("Bake All To Action"); - ob = get_object_from_active_strip(); - //build_match_caches(ob); - } - else - borderselect_nla(); - break; + if (G.qual & LR_SHIFTKEY){ + bake_all_to_action(); + allqueue (REDRAWNLA, 0); + allqueue (REDRAWVIEW3D, 0); + BIF_undo_push("Bake All To Action"); + ob = get_object_from_active_strip(); + //build_match_caches(ob); + } + else if (G.qual & LR_CTRLKEY) + borderselect_markers(); + else + borderselect_nla(); + break; case CKEY: if(G.qual==LR_CTRLKEY) { @@ -1737,11 +1736,6 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt) case DKEY: if (G.qual == (LR_CTRLKEY|LR_SHIFTKEY) && mval[0]>=NLAWIDTH) { duplicate_marker(); - allqueue(REDRAWTIME, 0); - allqueue(REDRAWIPO, 0); - allqueue(REDRAWACTION, 0); - allqueue(REDRAWNLA, 0); - allqueue(REDRAWSOUND, 0); } else if (G.qual & LR_SHIFTKEY && mval[0]>=NLAWIDTH){ duplicate_nlachannel_keys(); @@ -1752,7 +1746,7 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt) case GKEY: if (mval[0]>=NLAWIDTH) { - if (G.qual & LR_SHIFTKEY) { + if (G.qual & LR_CTRLKEY) { transform_markers('g', 0); } else { @@ -1766,7 +1760,7 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt) /* marker operations */ if (G.qual == 0) add_marker(CFRA); - else if (G.qual == LR_SHIFTKEY) + else if (G.qual == LR_CTRLKEY) rename_marker(); else break; diff --git a/source/blender/src/editsound.c b/source/blender/src/editsound.c index 365c26ee255..e167ebbafb4 100644 --- a/source/blender/src/editsound.c +++ b/source/blender/src/editsound.c @@ -227,13 +227,7 @@ void winqreadsoundspace(ScrArea *sa, void *spacedata, BWinEvent *evt) break; case BKEY: /* borderselect markers */ - borderselect_timeline_markers(); - - allqueue(REDRAWTIME, 0); - allqueue(REDRAWIPO, 0); - allqueue(REDRAWACTION, 0); - allqueue(REDRAWNLA, 0); - allqueue(REDRAWSOUND, 0); + borderselect_markers(); break; case DKEY: /* duplicate selected marker(s) */ @@ -253,7 +247,7 @@ void winqreadsoundspace(ScrArea *sa, void *spacedata, BWinEvent *evt) break; case MKEY: /* add marker or rename first selected */ - if (G.qual & LR_SHIFTKEY) + if (G.qual & LR_CTRLKEY) rename_marker(); else add_marker(CFRA); diff --git a/source/blender/src/edittime.c b/source/blender/src/edittime.c index a92efac3034..ffa2b8b8354 100644 --- a/source/blender/src/edittime.c +++ b/source/blender/src/edittime.c @@ -319,7 +319,7 @@ void deselect_markers(short test, short sel) } } -void borderselect_markers(float xmin, float xmax, int selectmode) +static void borderselect_markers_func(float xmin, float xmax, int selectmode) { TimeMarker *marker; @@ -339,6 +339,39 @@ void borderselect_markers(float xmin, float xmax, int selectmode) } } +/* border-select markers */ +void borderselect_markers(void) +{ + rcti rect; + rctf rectf; + int val, selectmode; + short mval[2]; + + if ( (val = get_border(&rect, 3)) ){ + if (val == LEFTMOUSE) + selectmode = SELECT_ADD; + else + selectmode = SELECT_SUBTRACT; + + mval[0]= rect.xmin; + mval[1]= rect.ymin+2; + areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin); + mval[0]= rect.xmax; + mval[1]= rect.ymax-2; + areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); + + /* do markers */ + borderselect_markers_func(rectf.xmin, rectf.xmax, selectmode); + + BIF_undo_push("Border Select Markers"); + allqueue(REDRAWTIME, 0); + allqueue(REDRAWIPO, 0); + allqueue(REDRAWACTION, 0); + allqueue(REDRAWNLA, 0); + allqueue(REDRAWSOUND, 0); + } +} + void nextprev_marker(short dir) { TimeMarker *marker, *cur=NULL, *first, *last; @@ -404,39 +437,6 @@ TimeMarker *find_nearest_marker(int clip_y) /* *********** End Markers - Markers API *************** */ -/* border-select markers */ -void borderselect_timeline_markers(void) -{ - rcti rect; - rctf rectf; - int val, selectmode; - short mval[2]; - - if ( (val = get_border(&rect, 3)) ){ - if (val == LEFTMOUSE) - selectmode = SELECT_ADD; - else - selectmode = SELECT_SUBTRACT; - - mval[0]= rect.xmin; - mval[1]= rect.ymin+2; - areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin); - mval[0]= rect.xmax; - mval[1]= rect.ymax-2; - areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); - - /* do markers */ - borderselect_markers(rectf.xmin, rectf.xmax, selectmode); - - BIF_undo_push("Border Select TimeLine"); - allqueue(REDRAWTIME, 0); - allqueue(REDRAWIPO, 0); - allqueue(REDRAWACTION, 0); - allqueue(REDRAWNLA, 0); - allqueue(REDRAWSOUND, 0); - } -} - static int find_nearest_timeline_marker(float dx) { TimeMarker *marker, *nearest= NULL; @@ -758,7 +758,7 @@ void winqreadtimespace(ScrArea *sa, void *spacedata, BWinEvent *evt) break; case BKEY: /* borderselect markers */ - borderselect_timeline_markers(); + borderselect_markers(); break; case DKEY: if(G.qual==LR_SHIFTKEY) @@ -776,7 +776,7 @@ void winqreadtimespace(ScrArea *sa, void *spacedata, BWinEvent *evt) allqueue(REDRAWTIME, 1); break; case MKEY: /* add, rename marker */ - if (G.qual & LR_SHIFTKEY) + if (G.qual & LR_CTRLKEY) rename_marker(); else add_marker(CFRA); diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c index 5a25245a076..3c06078b467 100644 --- a/source/blender/src/header_action.c +++ b/source/blender/src/header_action.c @@ -88,14 +88,14 @@ #define ACTMENU_VIEW_NEXTMARKER 8 #define ACTMENU_VIEW_PREVMARKER 9 - #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_SEL_BORDERM 1 +#define ACTMENU_SEL_ALL_KEYS 2 +#define ACTMENU_SEL_ALL_CHAN 3 +#define ACTMENU_SEL_COLUMN 4 +#define ACTMENU_SEL_ALL_MARKERS 5 +#define ACTMENU_SEL_MARKERS_KEYSBETWEEN 6 +#define ACTMENU_SEL_MARKERS_KEYSCOLUMN 7 #define ACTMENU_KEY_DUPLICATE 0 #define ACTMENU_KEY_DELETE 1 @@ -376,6 +376,10 @@ static void do_action_selectmenu(void *arg, int event) borderselect_action(); } break; + + case ACTMENU_SEL_BORDERM: /* Border Select */ + borderselect_markers(); + break; case ACTMENU_SEL_ALL_KEYS: /* Select/Deselect All Keys */ if (key) { @@ -431,9 +435,13 @@ static uiBlock *action_selectmenu(void *arg_unused) uiBlockSetButmFunc(block, do_action_selectmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, - "Border Select|B", 0, yco-=20, + "Border Select Keys|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, ACTMENU_SEL_BORDER, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, + "Border Select Markers|Ctrl B", 0, yco-=20, + menuwidth, 19, NULL, 0.0, 0.0, 0, + ACTMENU_SEL_BORDERM, ""); uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); @@ -1024,9 +1032,9 @@ static uiBlock *action_markermenu(void *arg_unused) uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "(Re)Name Marker|Shift M", 0, yco-=20, + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "(Re)Name Marker|Ctrl M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_MARKERS_NAME, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move Marker|Shift G", 0, yco-=20, + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move Marker|Ctrl G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_MARKERS_MOVE, ""); diff --git a/source/blender/src/header_ipo.c b/source/blender/src/header_ipo.c index a79302905d9..4ef707f282a 100644 --- a/source/blender/src/header_ipo.c +++ b/source/blender/src/header_ipo.c @@ -786,6 +786,9 @@ static void do_ipo_selectmenu(void *arg, int event) case 1: swap_selectall_editipo(); break; + case 2: + borderselect_markers(); + break; } } @@ -798,7 +801,10 @@ static uiBlock *ipo_selectmenu(void *arg_unused) uiBlockSetButmFunc(block, do_ipo_selectmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select Markers|Ctrl B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, ""); + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select/Deselect All|A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, ""); if(curarea->headertype==HEADERTOP) { @@ -860,9 +866,9 @@ static uiBlock *ipo_markermenu(void *arg_unused) uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "(Re)Name Marker|Shift M", 0, yco-=20, + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "(Re)Name Marker|Ctrl M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move Marker|Shift G", 0, yco-=20, + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move Marker|Ctrl G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); if(curarea->headertype==HEADERTOP) { diff --git a/source/blender/src/header_nla.c b/source/blender/src/header_nla.c index 9e5402e0f64..57cb2431f1a 100644 --- a/source/blender/src/header_nla.c +++ b/source/blender/src/header_nla.c @@ -191,6 +191,9 @@ static void do_nla_selectmenu(void *arg, int event) allqueue(REDRAWNLA, 0); allqueue(REDRAWSOUND, 0); break; + case 4: /* Borderselect markers */ + borderselect_markers(); + break; } } @@ -203,6 +206,7 @@ static uiBlock *nla_selectmenu(void *arg_unused) uiBlockSetButmFunc(block, do_nla_selectmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select Markers|Ctrl B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, ""); uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); @@ -402,9 +406,9 @@ static uiBlock *nla_markermenu(void *arg_unused) uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "(Re)Name Marker|Shift M", 0, yco-=20, + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "(Re)Name Marker|Ctrl M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move Marker|Shift G", 0, yco-=20, + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move Marker|Ctrl G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); if(curarea->headertype==HEADERTOP) { diff --git a/source/blender/src/header_sound.c b/source/blender/src/header_sound.c index 73ff9a75413..c6c22da7dd5 100644 --- a/source/blender/src/header_sound.c +++ b/source/blender/src/header_sound.c @@ -286,7 +286,7 @@ static uiBlock *sound_markermenu(void *arg_unused) uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "(Re)Name Marker|Shift M", 0, yco-=20, + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "(Re)Name Marker|Ctrl M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move Marker|G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); diff --git a/source/blender/src/header_time.c b/source/blender/src/header_time.c index b0a9b45ca95..9d0b4d1f84a 100644 --- a/source/blender/src/header_time.c +++ b/source/blender/src/header_time.c @@ -330,7 +330,7 @@ static uiBlock *time_framemenu(void *arg_unused) uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Name Marker|Shift M", 0, yco-=20, + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Name Marker|Ctrl M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move Marker|G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 1f5131ecdea..db8c0781f6a 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -2418,6 +2418,9 @@ static void winqreadipospace(ScrArea *sa, void *spacedata, BWinEvent *evt) case BKEY: if (G.qual==0) borderselect_ipo(); + else if (G.qual==LR_CTRLKEY) { + borderselect_markers(); + } break; case CKEY: if (G.qual==0) @@ -2430,7 +2433,7 @@ static void winqreadipospace(ScrArea *sa, void *spacedata, BWinEvent *evt) duplicate_marker(); break; case GKEY: - if (G.qual & LR_SHIFTKEY) + if (G.qual & LR_CTRLKEY) transform_markers('g', 0); else if (G.qual==0) transform_ipo('g'); @@ -2456,13 +2459,13 @@ static void winqreadipospace(ScrArea *sa, void *spacedata, BWinEvent *evt) } break; case MKEY: - if (G.qual==LR_CTRLKEY) { + if (G.qual==LR_SHIFTKEY) { ipo_mirror_menu(); break; } if (G.qual == 0) add_marker(CFRA); - else if (G.qual == LR_SHIFTKEY) + else if (G.qual == LR_CTRLKEY) rename_marker(); else break; |