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-09 18:37:54 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-05-11 11:14:35 +0300
commit4fe5a105f6da5131396f93658389103475d89b09 (patch)
treeed87289dd29c2d597d79d6ab80f5c65c603005e9 /source/blender/modifiers/intern/MOD_util.c
parentb726ff4fc4175e1921d7cf6758a7fbb0e4e90576 (diff)
Fix bad pointer cast when modifier is used on non-mesh object
Diffstat (limited to 'source/blender/modifiers/intern/MOD_util.c')
-rw-r--r--source/blender/modifiers/intern/MOD_util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index 95d75174b0c..818c13b4e44 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -300,6 +300,8 @@ Mesh *get_mesh(Object *ob, struct BMEditMesh *em, Mesh *mesh,
struct BMeshToMeshParams bmtmp = {0};
if (em) mesh = BKE_bmesh_to_mesh_nomain(em->bm, &bmtmp);
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. */
BKE_id_copy_ex(
NULL, ob->data, (ID **)&mesh,
LIB_ID_CREATE_NO_MAIN |
@@ -308,6 +310,8 @@ Mesh *get_mesh(Object *ob, struct BMEditMesh *em, Mesh *mesh,
false);
}
+ /* TODO(sybren): after modifier conversion of DM to Mesh is done, check whether
+ * we really need vertexCos here. */
if (vertexCos) {
BKE_mesh_apply_vert_coords(mesh, vertexCos);
mesh->runtime.cd_dirty_vert |= CD_MASK_NORMAL;