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:
authorSybren A. Stüvel <sybren@stuvel.eu>2018-05-16 15:33:14 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-05-16 17:13:13 +0300
commit76b5e38a76ecac4522edc72f310c88428cc2d23a (patch)
tree9ce2bdf4bfe28275981b2a7a86baeb5965a800f3
parent739c3e8102b3b251795987242a1ba8bb1564cf84 (diff)
Mesh: Set deformed_only=1 when copied mesh is from main library
-rw-r--r--source/blender/blenkernel/intern/mesh.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index efafdf949dc..266247d5143 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -553,7 +553,14 @@ void BKE_mesh_copy_data(Main *bmain, Mesh *me_dst, const Mesh *me_src, const int
me_dst->edit_btmesh = NULL;
me_dst->runtime.batch_cache = NULL;
me_dst->runtime.bvh_cache = NULL;
- me_dst->runtime.deformed_only = me_src->runtime.deformed_only;
+
+ if (me_src->id.tag & LIB_TAG_NO_MAIN) {
+ me_dst->runtime.deformed_only = me_src->runtime.deformed_only;
+ }
+ else {
+ /* This is a direct copy of a main mesh, so for now it has the same topology. */
+ me_dst->runtime.deformed_only = 1;
+ }
me_dst->mselect = MEM_dupallocN(me_dst->mselect);
me_dst->bb = MEM_dupallocN(me_dst->bb);