== Action Editor - Column Select tools ==
Added a new column-select type of tool: Select keys on current frame. As a result, I've changed the hotkeys for column select: * KKEY - select keys on same frame as selected keys * CTRL-KKEY - select keys on same frame as current frame * SHIFT-KKEY - select keys on same frame as selected markers * ALT-KKEY - select keys between selected markers
This commit is contained in:
@@ -2890,6 +2890,16 @@ void column_select_action_keys (int mode)
|
||||
ce->cfra= get_action_frame(OBACT, ce->cfra);
|
||||
}
|
||||
break;
|
||||
case 3: /* current frame */
|
||||
/* make a single CfraElem */
|
||||
ce= MEM_callocN(sizeof(CfraElem), "cfraElem");
|
||||
BLI_addtail(&elems, ce);
|
||||
|
||||
/* apply scaled action correction if needed */
|
||||
if (NLA_ACTION_SCALED && datatype==ACTCONT_ACTION)
|
||||
ce->cfra= get_action_frame(OBACT, CFRA);
|
||||
else
|
||||
ce->cfra= CFRA;
|
||||
}
|
||||
|
||||
/* loop through all of the keys and select additional keyframes
|
||||
@@ -4031,7 +4041,7 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
printf("\t\tAchan \"%s\" : %p... group={%p} \n", achan->name, achan, achan->grp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Transforms */
|
||||
else {
|
||||
if (mval[0] >= ACTWIDTH) {
|
||||
@@ -4055,13 +4065,14 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
break;
|
||||
|
||||
case KKEY:
|
||||
if (G.qual & LR_CTRLKEY) {
|
||||
if (G.qual == LR_ALTKEY)
|
||||
markers_selectkeys_between();
|
||||
}
|
||||
else {
|
||||
val= (G.qual & LR_SHIFTKEY) ? 2 : 1;
|
||||
column_select_action_keys(val);
|
||||
}
|
||||
else if (G.qual == LR_SHIFTKEY)
|
||||
column_select_action_keys(2);
|
||||
else if (G.qual == LR_CTRLKEY)
|
||||
column_select_action_keys(3);
|
||||
else
|
||||
column_select_action_keys(1);
|
||||
|
||||
allqueue(REDRAWMARKER, 0);
|
||||
break;
|
||||
|
||||
@@ -117,8 +117,9 @@ enum {
|
||||
|
||||
enum {
|
||||
ACTMENU_SEL_COLUMN_KEYS = 1,
|
||||
ACTMENU_SEL_COLUMN_CFRA,
|
||||
ACTMENU_SEL_COLUMN_MARKERSCOLUMN,
|
||||
ACTMENU_SEL_COLUMN_MARKERSBETWEEN
|
||||
ACTMENU_SEL_COLUMN_MARKERSBETWEEN
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -503,6 +504,9 @@ static void do_action_selectmenu_columnmenu(void *arg, int event)
|
||||
case ACTMENU_SEL_COLUMN_MARKERSCOLUMN:
|
||||
column_select_action_keys(2);
|
||||
break;
|
||||
case ACTMENU_SEL_COLUMN_CFRA:
|
||||
column_select_action_keys(3);
|
||||
break;
|
||||
}
|
||||
|
||||
allqueue(REDRAWMARKER, 0);
|
||||
@@ -520,11 +524,14 @@ static uiBlock *action_selectmenu_columnmenu(void *arg_unused)
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
|
||||
"On Selected Keys|K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
|
||||
ACTMENU_SEL_COLUMN_KEYS, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
|
||||
"On Current Frame|Ctrl K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
|
||||
ACTMENU_SEL_COLUMN_CFRA, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
|
||||
"On Selected Markers|Shift K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
|
||||
ACTMENU_SEL_COLUMN_MARKERSCOLUMN, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
|
||||
"Between Selected Markers|Ctrl K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
|
||||
"Between Selected Markers|Alt K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
|
||||
ACTMENU_SEL_COLUMN_MARKERSBETWEEN, "");
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user