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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-10-20 21:53:29 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-10-20 21:53:29 +0400
commitf023fcf5354d2a2c95f358d9f5d0cacf7f45d4ec (patch)
treeb6fcc4909650618c1cb76ed2124c9f855172cc16 /source/blender/editors/animation/anim_filter.c
parent8587ce85975952957580291f5554cd75a2fdeae3 (diff)
Project Pampa request: show curves for node grupps
It was not implemented in anim filter yet. it's strictly speaking not so much clear how "selected only" mode is expected to work when having multiple node trees editing at the same time. For now all the animation data from selected group will be displayed.
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 09b6e7d2206..b7a1614146a 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1503,8 +1503,7 @@ static size_t animdata_filter_mask(ListBase *anim_data, void *UNUSED(data), int
}
/* NOTE: owner_id is scene, material, or texture block, which is the direct owner of the node tree in question */
-// TODO: how to handle group nodes is still unclear...
-static size_t animdata_filter_ds_nodetree(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, bNodeTree *ntree, int filter_mode)
+static size_t animdata_filter_ds_nodetree_group(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, bNodeTree *ntree, int filter_mode)
{
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
@@ -1538,6 +1537,32 @@ static size_t animdata_filter_ds_nodetree(bAnimContext *ac, ListBase *anim_data,
return items;
}
+static size_t animdata_filter_ds_nodetree(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, bNodeTree *ntree, int filter_mode)
+{
+ bNode *node;
+ size_t items = 0;
+ int group_filter_mode = filter_mode & ~ADS_FILTER_ONLYSEL;
+
+ items += animdata_filter_ds_nodetree_group(ac, anim_data, ads, owner_id, ntree, filter_mode);
+
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->type == NODE_GROUP) {
+ if (node->id) {
+ int filterflag = ads->filterflag;
+ if ((filter_mode & ADS_FILTER_ONLYSEL) && (node->flag & NODE_SELECT) == 0) {
+ continue;
+ }
+ /* TODO(sergey): A bit creepy, but this flag is not used from threads anyway. */
+ ads->filterflag &= ~ADS_FILTER_ONLYSEL;
+ items += animdata_filter_ds_nodetree_group(ac, anim_data, ads, owner_id, (bNodeTree *) node->id, group_filter_mode);
+ ads->filterflag = filterflag;
+ }
+ }
+ }
+
+ return items;
+}
+
static size_t animdata_filter_ds_linestyle(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
{
SceneRenderLayer *srl;