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>2014-03-09 10:23:32 +0400
committerJoshua Leung <aligorith@gmail.com>2014-03-09 10:23:32 +0400
commitd219312d44d7153dfe74eeef1dd0f8cbbc1340f3 (patch)
tree4fa2b18f787a957a874ef249f2bee84477597eb3 /source/blender/editors/animation/anim_filter.c
parentfa24ad1fd50cdd6a6af2b76736fe8e1430ee3cd7 (diff)
Fix T39018: Duplicate entries for material/shader in AnimEditors
In many BI shader setups, the material which owns the nodetree is often itself included as a node in that nodetree (i.e. to provide the base colour for that mesh). This would often result in the material (and its subtree) getting included in the dopesheet results twice.
Diffstat (limited to 'source/blender/editors/animation/anim_filter.c')
-rw-r--r--source/blender/editors/animation/anim_filter.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 9d54d938cc7..a4a1e951477 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1796,9 +1796,14 @@ static size_t animdata_filter_ds_materials(bAnimContext *ac, ListBase *anim_data
Material *base = give_current_material(ob, a);
Material *ma = give_node_material(base);
- /* add channels from the nested material if it exists */
- if (ma)
+ /* add channels from the nested material if it exists
+ * - skip if the same material is referenced in its node tree
+ * (which is common for BI materials) as that results in
+ * confusing duplicates
+ */
+ if ((ma) && (ma != base)) {
items += animdata_filter_ds_material(ac, anim_data, ads, ma, filter_mode);
+ }
}
}