diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-14 15:34:00 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-14 15:34:00 +0300 |
commit | e5b53fb28cab9f39f888b7ec1c128b990d3b7a36 (patch) | |
tree | 754103fed03ca00c146a02b7f55ed7d9e4b9a19c /source/blender/modifiers | |
parent | eabfd031fa055dc064c751b4cd2cb6a783a24cfd (diff) |
Some cleanup in modifiers' mesh copying.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_boolean.c | 7 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_util.c | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index 7694265a172..ebe5aacd888 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -119,7 +119,12 @@ static Mesh *get_quick_mesh( result = mesh_self; } else { - BKE_id_copy_ex(NULL, &mesh_other->id, (ID **)&result, LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false); + BKE_id_copy_ex(NULL, &mesh_other->id, (ID **)&result, + LIB_ID_CREATE_NO_MAIN | + LIB_ID_CREATE_NO_USER_REFCOUNT | + LIB_ID_CREATE_NO_DEG_TAG | + LIB_ID_COPY_NO_PREVIEW, + false); float imat[4][4]; float omat[4][4]; 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); } |