diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-28 10:23:46 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-28 10:23:46 +0300 |
commit | d66a27de2e4920737f59655ffc6802902ef77f4a (patch) | |
tree | db6bda0230c488a9f45acba0a9381eec2bfb3bad /source/blender/blenkernel/intern/material.c | |
parent | d60acd0e94e6339b2772662657a98771bc3d1729 (diff) |
Fix T48961: Material slots become easily desynced over linked duplicates.
Own mistake in recent changes (split to test_object_materials()/test_all_objects_materials()).
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 0be32c9b84c..470108545b8 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -742,17 +742,18 @@ void assign_material(Object *ob, Material *ma, short act, int assign_type) if (mao) id_us_min(&mao->id); ob->mat[act - 1] = ma; + test_object_materials(ob, ob->data); } else { /* in data */ mao = (*matarar)[act - 1]; if (mao) id_us_min(&mao->id); (*matarar)[act - 1] = ma; + test_all_objects_materials(G.main, ob->data); /* Data may be used by several objects... */ } if (ma) id_us_plus(&ma->id); - test_object_materials(ob, ob->data); } |