Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/mesh_wrapper.c
| Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | case ME_WRAPPER_TYPE_BMESH: { | ||||
| me->totloop = 0; | me->totloop = 0; | ||||
| BLI_assert(me->edit_mesh != NULL); | BLI_assert(me->edit_mesh != NULL); | ||||
| BLI_assert(me->runtime.edit_data != NULL); | BLI_assert(me->runtime.edit_data != NULL); | ||||
| BMEditMesh *em = me->edit_mesh; | BMEditMesh *em = me->edit_mesh; | ||||
| BM_mesh_bm_to_me_for_eval(em->bm, me, &me->runtime.cd_mask_extra); | BM_mesh_bm_to_me_for_eval(em->bm, me, &me->runtime.cd_mask_extra); | ||||
| /* Adding original index layers assumes that all BMesh mesh wrappers are created from | |||||
| * original edit mode meshes (the only case where adding original indices makes sense). | |||||
| * If that assumption is broken, the layers might be incorrect in that they might not | |||||
| * actually be "original". | |||||
JacquesLucke: I wonder what you mean with "assume" here:
* Does it mean that something would break if the… | |||||
| * | |||||
| * There is also a performance aspect, where this also assumes that original indices are | |||||
| * always needed when converting an edit mesh to a mesh. That might be wrong, but it's not | |||||
| * harmful. */ | |||||
| BKE_mesh_ensure_default_orig_index_layers(me); | |||||
| EditMeshData *edit_data = me->runtime.edit_data; | EditMeshData *edit_data = me->runtime.edit_data; | ||||
| if (edit_data->vertexCos) { | if (edit_data->vertexCos) { | ||||
| BKE_mesh_vert_coords_apply(me, edit_data->vertexCos); | BKE_mesh_vert_coords_apply(me, edit_data->vertexCos); | ||||
| me->runtime.is_original = false; | me->runtime.is_original = false; | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 265 Lines • Show Last 20 Lines | |||||
I wonder what you mean with "assume" here: