From af9a6aad990a86b34d5be0ee4c48554f10261eae Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Wed, 4 Sep 2013 00:21:27 +0000 Subject: Fix for redundant multiple animation data items of the same line style in DopeSheet. This could happen when a line style is shared by multiple linesets within a scene. --- source/blender/editors/animation/anim_filter.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/animation/anim_filter.c') diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 14974cd070f..041a2c2216e 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1541,10 +1541,16 @@ static size_t animdata_filter_ds_nodetree(bAnimContext *ac, ListBase *anim_data, static size_t animdata_filter_ds_linestyle(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode) { SceneRenderLayer *srl; + FreestyleLineSet *lineset; size_t items = 0; for (srl = sce->r.layers.first; srl; srl = srl->next) { - FreestyleLineSet *lineset; + for (lineset = srl->freestyleConfig.linesets.first; lineset; lineset = lineset->next) { + lineset->linestyle->id.flag |= LIB_DOIT; + } + } + + for (srl = sce->r.layers.first; srl; srl = srl->next) { /* skip render layers without Freestyle enabled */ if (!(srl->layflag & SCE_LAY_FRS)) @@ -1555,6 +1561,10 @@ static size_t animdata_filter_ds_linestyle(bAnimContext *ac, ListBase *anim_data FreestyleLineStyle *linestyle = lineset->linestyle; ListBase tmp_data = {NULL, NULL}; size_t tmp_items = 0; + + if (!(linestyle->id.flag & LIB_DOIT)) + continue; + linestyle->id.flag &= ~LIB_DOIT; /* add scene-level animation channels */ BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_LS_SCED(linestyle)) -- cgit v1.2.3