Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/object_dupli.cc
| Show First 20 Lines • Show All 329 Lines • ▼ Show 20 Lines | static Mesh *mesh_data_from_duplicator_object(Object *ob, | ||||
| /* We do not need any render-specific handling anymore, depsgraph takes care of that. */ | /* We do not need any render-specific handling anymore, depsgraph takes care of that. */ | ||||
| /* NOTE: Do direct access to the evaluated mesh: this function is used | /* NOTE: Do direct access to the evaluated mesh: this function is used | ||||
| * during meta balls evaluation. But even without those all the objects | * during meta balls evaluation. But even without those all the objects | ||||
| * which are needed for correct instancing are already evaluated. */ | * which are needed for correct instancing are already evaluated. */ | ||||
| if (em != nullptr) { | if (em != nullptr) { | ||||
| /* Note that this will only show deformation if #eModifierMode_OnCage is enabled. | /* Note that this will only show deformation if #eModifierMode_OnCage is enabled. | ||||
| * We could change this but it matches 2.7x behavior. */ | * We could change this but it matches 2.7x behavior. */ | ||||
| me_eval = em->mesh_eval_cage; | EditMeshData *emd = ((Mesh *)ob->data)->runtime.edit_data; | ||||
| me_eval = (emd) ? emd->eval.mesh_eval_cage : nullptr; | |||||
| if ((me_eval == nullptr) || (me_eval->runtime.wrapper_type == ME_WRAPPER_TYPE_BMESH)) { | if ((me_eval == nullptr) || (me_eval->runtime.wrapper_type == ME_WRAPPER_TYPE_BMESH)) { | ||||
| EditMeshData *emd = me_eval ? me_eval->runtime.edit_data : nullptr; | /* XXX, investigate this! `emd` from two places is confusing! */ | ||||
| emd = me_eval ? me_eval->runtime.edit_data : nullptr; | |||||
| /* Only assign edit-mesh in the case we can't use `me_eval`. */ | /* Only assign edit-mesh in the case we can't use `me_eval`. */ | ||||
| *r_em = em; | *r_em = em; | ||||
| me_eval = nullptr; | me_eval = nullptr; | ||||
| if ((emd != nullptr) && (emd->vertexCos != nullptr)) { | if ((emd != nullptr) && (emd->vertexCos != nullptr)) { | ||||
| *r_vert_coords = emd->vertexCos; | *r_vert_coords = emd->vertexCos; | ||||
| if (r_vert_normals != nullptr) { | if (r_vert_normals != nullptr) { | ||||
| ▲ Show 20 Lines • Show All 1,261 Lines • Show Last 20 Lines | |||||