Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2008-01-30 13:43:44 +0300
committerJoshua Leung <aligorith@gmail.com>2008-01-30 13:43:44 +0300
commite0a625937ba132cd1629dc307082f2f7abf93705 (patch)
treecbe8480bc95f39c29190d6858b7d11007f57427e /source
parent5714c84c54b73ceb67f8eb2d73dfc8783e98b1d4 (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesdna/DNA_action_types.h4
-rw-r--r--source/blender/src/drawaction.c4
-rw-r--r--source/blender/src/header_action.c12
3 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 15e88ea0b86..03b546f42f1 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -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) */
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c
index 64af3041155..aac13231c50 100644
--- a/source/blender/src/drawaction.c
+++ b/source/blender/src/drawaction.c
@@ -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;
diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c
index c48e646af4c..f94551bc335 100644
--- a/source/blender/src/header_action.c
+++ b/source/blender/src/header_action.c
@@ -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,