Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_util.c
| Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | Mesh *MOD_deform_mesh_eval_get(Object *ob, | ||||
| const bool use_normals, | const bool use_normals, | ||||
| const bool use_orco) | const bool use_orco) | ||||
| { | { | ||||
| if (mesh != NULL) { | if (mesh != NULL) { | ||||
| /* pass */ | /* pass */ | ||||
| } | } | ||||
| else if (ob->type == OB_MESH) { | else if (ob->type == OB_MESH) { | ||||
| if (em) { | if (em) { | ||||
| mesh = BKE_mesh_from_bmesh_for_eval_nomain(em->bm, NULL); | mesh = BKE_mesh_from_bmesh_for_eval_nomain(em->bm, NULL, ob->data); | ||||
| } | } | ||||
| else { | else { | ||||
| /* TODO(sybren): after modifier conversion of DM to Mesh is done, check whether | /* 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. */ | * we really need a copy here. Maybe the CoW ob->data can be directly used. */ | ||||
| Mesh *mesh_prior_modifiers = BKE_object_get_pre_modified_mesh(ob); | Mesh *mesh_prior_modifiers = BKE_object_get_pre_modified_mesh(ob); | ||||
| BKE_id_copy_ex(NULL, | BKE_id_copy_ex(NULL, | ||||
| &mesh_prior_modifiers->id, | &mesh_prior_modifiers->id, | ||||
| (ID **)&mesh, | (ID **)&mesh, | ||||
| ▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines | |||||