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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-05-14 15:34:00 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-14 15:34:00 +0300
commite5b53fb28cab9f39f888b7ec1c128b990d3b7a36 (patch)
tree754103fed03ca00c146a02b7f55ed7d9e4b9a19c /source/blender/modifiers/intern/MOD_util.c
parenteabfd031fa055dc064c751b4cd2cb6a783a24cfd (diff)
Some cleanup in modifiers' mesh copying.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_util.c')
-rw-r--r--source/blender/modifiers/intern/MOD_util.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index 6de0cd753cd..f3da8d054ec 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -300,8 +300,9 @@ Mesh *get_mesh(
/* pass */
}
else if (ob->type == OB_MESH) {
- struct BMeshToMeshParams bmtmp = {0};
- if (em) mesh = BKE_bmesh_to_mesh_nomain(em->bm, &bmtmp);
+ if (em) {
+ mesh = BKE_bmesh_to_mesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
+ }
else {
/* TODO(sybren): after modifier conversion of DM to Mesh is done, check whether
* we really need a copy here. Maybe the CoW ob->data can be directly used. */
@@ -309,7 +310,8 @@ Mesh *get_mesh(
NULL, ob->data, (ID **)&mesh,
LIB_ID_CREATE_NO_MAIN |
LIB_ID_CREATE_NO_USER_REFCOUNT |
- LIB_ID_CREATE_NO_DEG_TAG,
+ LIB_ID_CREATE_NO_DEG_TAG |
+ LIB_ID_COPY_NO_PREVIEW,
false);
}