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
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-10-13 15:21:02 +0400
committerJoshua Leung <aligorith@gmail.com>2009-10-13 15:21:02 +0400
commitde818dace53343a1fcbb03d8e535a77617c037fa (patch)
treeea7fb3911d8d3409488577fe0c89e3d89b527471 /source/blender/editors/animation/anim_filter.c
parentf4d29269866a3bc4f9346bf24753d72da2456fc9 (diff)
DopeSheet: DopeSheet Summary Channel
Added a summary channel that appears as the first channel in the DopeSheet. For now, this is disabled by default, but can be enabled using the 'Summary' toggle in the header between the mode selector and the standard filtering options. This has been done, since there is a possibility that it will make the DopeSheet run a bit slower. In this channel you can do everything that you can normally do with DopeSheet channels (i.e. select, transform, edit, etc). It might be worth noting though that care probably needs to be taken when trying to use Copy/Paste, since that is still a bit fidgety... In the process, I've fixed a few bugs, mostly with selection: - Selecting keyframes in scene summaries wouldn't work - Border select only worked in F-Curve and Group channels
Diffstat (limited to 'source/blender/editors/animation/anim_filter.c')
-rw-r--r--source/blender/editors/animation/anim_filter.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index fef910a85a3..7aba237ffb1 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -458,6 +458,16 @@ bAnimListElem *make_new_animlistelem (void *data, short datatype, void *owner, s
/* do specifics */
switch (datatype) {
+ case ANIMTYPE_SUMMARY:
+ {
+ /* nothing to include for now... this is just a dummy wrappy around all the other channels
+ * in the DopeSheet, and gets included at the start of the list
+ */
+ ale->key_data= NULL;
+ ale->datatype= ALE_ALL;
+ }
+ break;
+
case ANIMTYPE_SCENE:
{
Scene *sce= (Scene *)data;
@@ -1497,7 +1507,7 @@ static int animdata_filter_dopesheet_scene (ListBase *anim_data, bDopeSheet *ads
}
// TODO: implement pinning... (if and when pinning is done, what we need to do is to provide freeing mechanisms - to protect against data that was deleted)
-static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int filter_mode)
+static int animdata_filter_dopesheet (ListBase *anim_data, bAnimContext *ac, bDopeSheet *ads, int filter_mode)
{
Scene *sce= (Scene *)ads->source;
Base *base;
@@ -1510,6 +1520,21 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
return 0;
}
+ /* dopesheet summary
+ * - only for drawing and/or selecting keyframes in channels, but not for real editing
+ * - only useful for DopeSheet Editor, where the summary is useful
+ */
+ // TODO: we should really check if some other prohibited filters are also active, but that can be for later
+ if ((filter_mode & ANIMFILTER_CHANNELS) && (ads->filterflag & ADS_FILTER_SUMMARY)) {
+ ale= make_new_animlistelem(ac, ANIMTYPE_SUMMARY, NULL, ANIMTYPE_NONE, NULL);
+ if (ale) {
+ BLI_addtail(anim_data, ale);
+ items++;
+ }
+
+ // TODO: if the summary gets a collapse widget, then we could make the other stuff not get shown...
+ }
+
/* scene-linked animation */
// TODO: sequencer, composite nodes - are we to include those here too?
{
@@ -1898,7 +1923,7 @@ int ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_mode
case ANIMCONT_FCURVES:
case ANIMCONT_DRIVERS:
case ANIMCONT_NLA:
- items= animdata_filter_dopesheet(anim_data, data, filter_mode);
+ items= animdata_filter_dopesheet(anim_data, ac, data, filter_mode);
break;
}