Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_util.c
| Show First 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | Mesh *MOD_deform_mesh_eval_get( | ||||
| float (*vertexCos)[3], const int num_verts, | float (*vertexCos)[3], const int num_verts, | ||||
| const bool use_normals, const bool use_orco) | const bool use_normals, 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, 0); | mesh = BKE_mesh_from_bmesh_for_eval_nomain(em->bm, NULL); | ||||
| } | } | ||||
| 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( | BKE_id_copy_ex( | ||||
| NULL, &mesh_prior_modifiers->id, (ID **)&mesh, | NULL, &mesh_prior_modifiers->id, (ID **)&mesh, | ||||
| (LIB_ID_COPY_LOCALIZE | | (LIB_ID_COPY_LOCALIZE | | ||||
| ▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines | |||||