Bugfix for Action Editor Optimisations:
Horizontal keyframe filtering is now optional per editor (off by default). This option may be removed in future, but currently it's there so that users can use it at their own risk. Apparently this has been causing people grief.
This commit is contained in:
@@ -221,7 +221,9 @@ typedef enum SACTION_FLAG {
|
||||
/* don't filter action channels according to visibility */
|
||||
SACTION_NOHIDE = (1<<3),
|
||||
/* don't kill overlapping keyframes after transform */
|
||||
SACTION_NOTRANSKEYCULL = (1<<4)
|
||||
SACTION_NOTRANSKEYCULL = (1<<4),
|
||||
/* don't include keyframes that are out of view */
|
||||
SACTION_HORIZOPTIMISEON = (1<<5)
|
||||
} SACTION_FLAG;
|
||||
|
||||
/* SpaceAction AutoSnap Settings (also used by SpaceNLA) */
|
||||
|
||||
@@ -1256,8 +1256,8 @@ static ActKeysInc *init_aki_data()
|
||||
aki.start= G.v2d->cur.xmin - 10;
|
||||
aki.end= G.v2d->cur.xmax + 10;
|
||||
|
||||
/* only pass pointer for Action Editor (for now) */
|
||||
if (curarea->spacetype == SPACE_ACTION)
|
||||
/* only pass pointer for Action Editor if enabled (for now) */
|
||||
if ((curarea->spacetype == SPACE_ACTION) && (G.saction->flag & SACTION_HORIZOPTIMISEON))
|
||||
return &aki;
|
||||
else
|
||||
return NULL;
|
||||
|
||||
@@ -99,7 +99,8 @@ enum {
|
||||
ACTMENU_VIEW_OPENLEVELS,
|
||||
ACTMENU_VIEW_CLOSELEVELS,
|
||||
ACTMENU_VIEW_EXPANDALL,
|
||||
ACTMENU_VIEW_TRANSDELDUPS
|
||||
ACTMENU_VIEW_TRANSDELDUPS,
|
||||
ACTMENU_VIEW_HORIZOPTIMISE
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -337,6 +338,9 @@ static void do_action_viewmenu(void *arg, int event)
|
||||
case ACTMENU_VIEW_TRANSDELDUPS: /* Don't delete duplicate/overlapping keyframes after transform */
|
||||
G.saction->flag ^= SACTION_NOTRANSKEYCULL;
|
||||
break;
|
||||
case ACTMENU_VIEW_HORIZOPTIMISE: /* Include keyframes not in view (horizontally) when preparing to draw */
|
||||
G.saction->flag ^= SACTION_HORIZOPTIMISEON;
|
||||
break;
|
||||
}
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
}
|
||||
@@ -382,6 +386,12 @@ static uiBlock *action_viewmenu(void *arg_unused)
|
||||
"Show Hidden Channels|", 0, yco-=20,
|
||||
menuwidth, 19, NULL, 0.0, 0.0, 1,
|
||||
ACTMENU_VIEW_NOHIDE, "");
|
||||
|
||||
// this option may get removed in future
|
||||
uiDefIconTextBut(block, BUTM, 1, (G.saction->flag & SACTION_HORIZOPTIMISEON)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
|
||||
"Cull Out-of-View Keys (Time)|", 0, yco-=20,
|
||||
menuwidth, 19, NULL, 0.0, 0.0, 1,
|
||||
ACTMENU_VIEW_HORIZOPTIMISE, "");
|
||||
|
||||
// this option may get removed in future...
|
||||
uiDefIconTextBut(block, BUTM, 1, (G.saction->flag & SACTION_NOTRANSKEYCULL)?ICON_CHECKBOX_DEHLT:ICON_CHECKBOX_HLT,
|
||||
|
||||
Reference in New Issue
Block a user