diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 11 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 53 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/editderivedmesh.c | 74 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 29 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_skinning.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex_proj.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_iterators.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_snap.c | 2 | ||||
-rw-r--r-- | source/blender/editors/util/crazyspace.c | 2 |
13 files changed, 126 insertions, 81 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 40fc71e82ca..8396380fd06 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -152,6 +152,11 @@ typedef enum DMDrawFlag { DM_DRAW_ALWAYS_SMOOTH = 2 } DMDrawFlag; +typedef enum DMForeachFlag { + DM_FOREACH_NOP = 0, + DM_FOREACH_USE_NORMAL = (1 << 0), /* foreachMappedVert, foreachMappedFaceCenter */ +} DMForeachFlag; + typedef enum DMDirtyFlag { /* dm has valid tessellated faces, but tessellated CDDATA need to be updated. */ DM_DIRTY_TESS_CDLAYERS = 1 << 0, @@ -285,7 +290,8 @@ struct DerivedMesh { void (*foreachMappedVert)(DerivedMesh *dm, void (*func)(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3]), - void *userData); + void *userData, + DMForeachFlag flag); /** Iterate over each mapped edge in the derived mesh, calling the * given function with the original edge and the mapped edge's new @@ -303,7 +309,8 @@ struct DerivedMesh { void (*foreachMappedFaceCenter)(DerivedMesh *dm, void (*func)(void *userData, int index, const float cent[3], const float no[3]), - void *userData); + void *userData, + DMForeachFlag flag); /** Iterate over all vertex points, calling DO_MINMAX with given args. * diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 9fea3d2e13f..ba680147201 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -1036,7 +1036,7 @@ static void vertex_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, fl if (ob->type != OB_MBALL) ob->flag |= OB_DONE; /* doesnt render */ if (me->edit_btmesh) { - dm->foreachMappedVert(dm, vertex_dupli__mapFunc, (void *) &vdd); + dm->foreachMappedVert(dm, vertex_dupli__mapFunc, (void *) &vdd, DM_FOREACH_USE_NORMAL); } else { for (a = 0; a < totvert; a++) { diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index faa4d8d3071..0e294f38838 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -1548,19 +1548,26 @@ static void cdDM_drawMappedEdges(DerivedMesh *dm, DMSetDrawOptions setDrawOption static void cdDM_foreachMappedVert( DerivedMesh *dm, void (*func)(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3]), - void *userData) + void *userData, + DMForeachFlag flag) { MVert *mv = CDDM_get_verts(dm); - int i, orig, *index = DM_get_vert_data_layer(dm, CD_ORIGINDEX); + int *index = DM_get_vert_data_layer(dm, CD_ORIGINDEX); + int i; - for (i = 0; i < dm->numVertData; i++, mv++) { - if (index) { - orig = *index++; + if (index) { + for (i = 0; i < dm->numVertData; i++, mv++) { + const short *no = (flag & DM_FOREACH_USE_NORMAL) ? mv->no : NULL; + const int orig = *index++; if (orig == ORIGINDEX_NONE) continue; - func(userData, orig, mv->co, NULL, mv->no); + func(userData, orig, mv->co, NULL, no); + } + } + else { + for (i = 0; i < dm->numVertData; i++, mv++) { + const short *no = (flag & DM_FOREACH_USE_NORMAL) ? mv->no : NULL; + func(userData, i, mv->co, NULL, no); } - else - func(userData, i, mv->co, NULL, mv->no); } } @@ -1588,47 +1595,37 @@ static void cdDM_foreachMappedEdge( static void cdDM_foreachMappedFaceCenter( DerivedMesh *dm, void (*func)(void *userData, int index, const float cent[3], const float no[3]), - void *userData) + void *userData, + DMForeachFlag flag) { CDDerivedMesh *cddm = (CDDerivedMesh *)dm; MVert *mvert = cddm->mvert; MPoly *mp; MLoop *ml; - int i, j, orig, *index; + int i, orig, *index; index = CustomData_get_layer(&dm->polyData, CD_ORIGINDEX); mp = cddm->mpoly; for (i = 0; i < dm->numPolyData; i++, mp++) { float cent[3]; - float no[3]; + float *no, _no[3]; if (index) { orig = *index++; if (orig == ORIGINDEX_NONE) continue; } - else + else { orig = i; + } ml = &cddm->mloop[mp->loopstart]; - cent[0] = cent[1] = cent[2] = 0.0f; - for (j = 0; j < mp->totloop; j++, ml++) { - add_v3_v3v3(cent, cent, mvert[ml->v].co); - } - mul_v3_fl(cent, 1.0f / (float)j); + BKE_mesh_calc_poly_center(mp, ml, mvert, cent); - ml = &cddm->mloop[mp->loopstart]; - if (j > 3) { - normal_quad_v3(no, - mvert[(ml + 0)->v].co, - mvert[(ml + 1)->v].co, - mvert[(ml + 2)->v].co, - mvert[(ml + 3)->v].co); + if (flag & DM_FOREACH_USE_NORMAL) { + BKE_mesh_calc_poly_normal(mp, ml, mvert, (no = _no)); } else { - normal_tri_v3(no, - mvert[(ml + 0)->v].co, - mvert[(ml + 1)->v].co, - mvert[(ml + 2)->v].co); + no = NULL; } func(userData, orig, cent, no); diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index b853d2b87a2..c9fc5f15d8b 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -86,7 +86,6 @@ static void emDM_ensurePolyNormals(EditDerivedBMesh *bmdm); static void emDM_ensureVertNormals(EditDerivedBMesh *bmdm) { - if (bmdm->vertexCos && (bmdm->vertexNos == NULL)) { BMesh *bm = bmdm->em->bm; @@ -196,9 +195,11 @@ static void emDM_recalcTessellation(DerivedMesh *UNUSED(dm)) /* do nothing */ } -static void emDM_foreachMappedVert(DerivedMesh *dm, - void (*func)(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3]), - void *userData) +static void emDM_foreachMappedVert( + DerivedMesh *dm, + void (*func)(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3]), + void *userData, + DMForeachFlag flag) { EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm; BMesh *bm = bmdm->em->bm; @@ -207,14 +208,26 @@ static void emDM_foreachMappedVert(DerivedMesh *dm, int i; if (bmdm->vertexCos) { - emDM_ensureVertNormals(bmdm); + const float (*vertexCos)[3] = bmdm->vertexCos; + const float (*vertexNos)[3]; + + if (flag & DM_FOREACH_USE_NORMAL) { + emDM_ensureVertNormals(bmdm); + vertexNos = bmdm->vertexNos; + } + else { + vertexNos = NULL; + } + BM_ITER_MESH_INDEX (eve, &iter, bm, BM_VERTS_OF_MESH, i) { - func(userData, i, bmdm->vertexCos[i], bmdm->vertexNos[i], NULL); + const float *no = (flag & DM_FOREACH_USE_NORMAL) ? vertexNos[i] : NULL; + func(userData, i, vertexCos[i], no, NULL); } } else { BM_ITER_MESH_INDEX (eve, &iter, bm, BM_VERTS_OF_MESH, i) { - func(userData, i, eve->co, eve->no, NULL); + const float *no = (flag & DM_FOREACH_USE_NORMAL) ? eve->no : NULL; + func(userData, i, eve->co, no, NULL); } } } @@ -359,9 +372,11 @@ static void emDM_drawUVEdges(DerivedMesh *dm) glEnd(); } -static void emDM_foreachMappedFaceCenter(DerivedMesh *dm, - void (*func)(void *userData, int index, const float co[3], const float no[3]), - void *userData) +static void emDM_foreachMappedFaceCenter( + DerivedMesh *dm, + void (*func)(void *userData, int index, const float co[3], const float no[3]), + void *userData, + DMForeachFlag flag) { EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm; BMesh *bm = bmdm->em->bm; @@ -371,13 +386,28 @@ static void emDM_foreachMappedFaceCenter(DerivedMesh *dm, BMIter iter; int i; - emDM_ensurePolyNormals(bmdm); emDM_ensurePolyCenters(bmdm); - polyNos = bmdm->polyNos; /* maybe NULL */ polyCos = bmdm->polyCos; /* always set */ - BM_ITER_MESH_INDEX (efa, &iter, bm, BM_FACES_OF_MESH, i) { - func(userData, i, polyCos[i], polyNos ? polyNos[i] : efa->no); + if (flag & DM_FOREACH_USE_NORMAL) { + emDM_ensurePolyNormals(bmdm); + polyNos = bmdm->polyNos; /* maybe NULL */ + } + else { + polyNos = NULL; + } + + if (polyNos) { + BM_ITER_MESH_INDEX (efa, &iter, bm, BM_FACES_OF_MESH, i) { + const float *no = polyNos[i]; + func(userData, i, polyCos[i], no); + } + } + else { + BM_ITER_MESH_INDEX (efa, &iter, bm, BM_FACES_OF_MESH, i) { + const float *no = (flag & DM_FOREACH_USE_NORMAL) ? efa->no : NULL; + func(userData, i, polyCos[i], no); + } } } @@ -433,10 +463,16 @@ static void emDM_drawMappedFaces(DerivedMesh *dm, const float (*vertexNos)[3]; const float (*polyNos)[3]; - emDM_ensureVertNormals(bmdm); - emDM_ensurePolyNormals(bmdm); - vertexNos = bmdm->vertexNos; - polyNos = bmdm->polyNos; + if (skip_normals) { + vertexNos = NULL; + polyNos = NULL; + } + else { + emDM_ensureVertNormals(bmdm); + emDM_ensurePolyNormals(bmdm); + vertexNos = bmdm->vertexNos; + polyNos = bmdm->polyNos; + } BM_mesh_elem_index_ensure(bm, BM_VERT | BM_FACE); @@ -2186,7 +2222,7 @@ float (*BKE_editmesh_vertexCos_get(BMEditMesh *em, Scene *scene, int *r_numVerts data.cos_cage = cos_cage; data.visit_bitmap = visit_bitmap; - cage->foreachMappedVert(cage, cage_mapped_verts_callback, &data); + cage->foreachMappedVert(cage, cage_mapped_verts_callback, &data, DM_FOREACH_NOP); MEM_freeN(visit_bitmap); diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 26a5dada108..7c5727b0f69 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -1505,7 +1505,8 @@ static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3]) static void ccgDM_foreachMappedVert( DerivedMesh *dm, void (*func)(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3]), - void *userData) + void *userData, + DMForeachFlag flag) { CCGDerivedMesh *ccgdm = (CCGDerivedMesh *) dm; CCGVertIterator *vi; @@ -1514,11 +1515,13 @@ static void ccgDM_foreachMappedVert( for (vi = ccgSubSurf_getVertIterator(ccgdm->ss); !ccgVertIterator_isStopped(vi); ccgVertIterator_next(vi)) { CCGVert *v = ccgVertIterator_getCurrent(vi); - CCGElem *vd = ccgSubSurf_getVertData(ccgdm->ss, v); - int index = ccgDM_getVertMapIndex(ccgdm->ss, v); + const int index = ccgDM_getVertMapIndex(ccgdm->ss, v); - if (index != -1) - func(userData, index, CCG_elem_co(&key, vd), CCG_elem_no(&key, vd), NULL); + if (index != -1) { + CCGElem *vd = ccgSubSurf_getVertData(ccgdm->ss, v); + const float *no = (flag & DM_FOREACH_USE_NORMAL) ? CCG_elem_no(&key, vd) : NULL; + func(userData, index, CCG_elem_co(&key, vd), no, NULL); + } } ccgVertIterator_free(vi); @@ -1539,12 +1542,13 @@ static void ccgDM_foreachMappedEdge( for (ei = ccgSubSurf_getEdgeIterator(ss); !ccgEdgeIterator_isStopped(ei); ccgEdgeIterator_next(ei)) { CCGEdge *e = ccgEdgeIterator_getCurrent(ei); - CCGElem *edgeData = ccgSubSurf_getEdgeDataArray(ss, e); - int index = ccgDM_getEdgeMapIndex(ss, e); + const int index = ccgDM_getEdgeMapIndex(ss, e); if (index != -1) { - for (i = 0; i < edgeSize - 1; i++) + CCGElem *edgeData = ccgSubSurf_getEdgeDataArray(ss, e); + for (i = 0; i < edgeSize - 1; i++) { func(userData, index, CCG_elem_offset_co(&key, edgeData, i), CCG_elem_offset_co(&key, edgeData, i + 1)); + } } } @@ -2530,7 +2534,8 @@ static void ccgDM_drawMappedEdgesInterp(DerivedMesh *dm, static void ccgDM_foreachMappedFaceCenter( DerivedMesh *dm, void (*func)(void *userData, int index, const float co[3], const float no[3]), - void *userData) + void *userData, + DMForeachFlag flag) { CCGDerivedMesh *ccgdm = (CCGDerivedMesh *) dm; CCGSubSurf *ss = ccgdm->ss; @@ -2541,13 +2546,13 @@ static void ccgDM_foreachMappedFaceCenter( for (fi = ccgSubSurf_getFaceIterator(ss); !ccgFaceIterator_isStopped(fi); ccgFaceIterator_next(fi)) { CCGFace *f = ccgFaceIterator_getCurrent(fi); - int index = ccgDM_getFaceMapIndex(ss, f); + const int index = ccgDM_getFaceMapIndex(ss, f); if (index != -1) { /* Face center data normal isn't updated atm. */ CCGElem *vd = ccgSubSurf_getFaceGridData(ss, f, 0, 0, 0); - - func(userData, index, CCG_elem_co(&key, vd), CCG_elem_no(&key, vd)); + const float *no = (flag & DM_FOREACH_USE_NORMAL) ? CCG_elem_no(&key, vd) : NULL; + func(userData, index, CCG_elem_co(&key, vd), no); } } diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c index 0a9cff3dc90..22bd22c8561 100644 --- a/source/blender/editors/armature/armature_skinning.c +++ b/source/blender/editors/armature/armature_skinning.c @@ -362,7 +362,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); if (dm->foreachMappedVert) { - dm->foreachMappedVert(dm, add_vgroups__mapFunc, (void *)verts); + dm->foreachMappedVert(dm, add_vgroups__mapFunc, (void *)verts, DM_FOREACH_NOP); vertsfilled = 1; } diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index ed05d2a01a5..059f8de7108 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -1351,7 +1351,7 @@ bool ED_mesh_pick_vert(bContext *C, Object *ob, const int mval[2], unsigned int data.len_best = FLT_MAX; data.v_idx_best = -1; - dm->foreachMappedVert(dm, ed_mesh_pick_vert__mapFunc, &data); + dm->foreachMappedVert(dm, ed_mesh_pick_vert__mapFunc, &data, DM_FOREACH_NOP); dm->release(dm); diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index b7bd061d14a..e145065daab 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -3413,7 +3413,7 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op) ED_view3d_init_mats_rv3d(ob, ar->regiondata); - dm->foreachMappedVert(dm, gradientVert__mapFunc, &data); + dm->foreachMappedVert(dm, gradientVert__mapFunc, &data, DM_FOREACH_NOP); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); diff --git a/source/blender/editors/sculpt_paint/paint_vertex_proj.c b/source/blender/editors/sculpt_paint/paint_vertex_proj.c index 2d5de80efeb..4c06cb8ea0d 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_proj.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_proj.c @@ -107,7 +107,7 @@ static void vpaint_proj_dm_map_cosnos_init(Scene *scene, Object *ob, if (dm->foreachMappedVert) { memset(vp_handle->vcosnos, 0, sizeof(DMCoNo) * me->totvert); - dm->foreachMappedVert(dm, vpaint_proj_dm_map_cosnos_init__map_cb, vp_handle); + dm->foreachMappedVert(dm, vpaint_proj_dm_map_cosnos_init__map_cb, vp_handle, DM_FOREACH_USE_NORMAL); } else { DMCoNo *v_co_no = vp_handle->vcosnos; @@ -183,7 +183,7 @@ static void vpaint_proj_dm_map_cosnos_update(struct VertProjHandle *vp_handle, if (LIKELY(dm->foreachMappedVert)) { fill_vn_fl(vp_handle->dists, me->totvert, FLT_MAX); - dm->foreachMappedVert(dm, vpaint_proj_dm_map_cosnos_update__map_cb, &vp_update); + dm->foreachMappedVert(dm, vpaint_proj_dm_map_cosnos_update__map_cb, &vp_update, DM_FOREACH_USE_NORMAL); } dm->release(dm); diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 38386a5c267..1d98906a6fb 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -2002,7 +2002,7 @@ static void drawSelectedVertices(DerivedMesh *dm, Mesh *me) data.col[2] = act_col; glBegin(GL_POINTS); - dm->foreachMappedVert(dm, drawSelectedVertices__mapFunc, &data); + dm->foreachMappedVert(dm, drawSelectedVertices__mapFunc, &data, DM_FOREACH_NOP); glEnd(); } @@ -2068,7 +2068,7 @@ static void draw_dm_face_normals(BMEditMesh *em, Scene *scene, Object *ob, Deriv calcDrawDMNormalScale(ob, &data); glBegin(GL_LINES); - dm->foreachMappedFaceCenter(dm, draw_dm_face_normals__mapFunc, &data); + dm->foreachMappedFaceCenter(dm, draw_dm_face_normals__mapFunc, &data, DM_FOREACH_USE_NORMAL); glEnd(); } @@ -2088,7 +2088,7 @@ static void draw_dm_face_centers(BMEditMesh *em, DerivedMesh *dm, char sel) void *ptrs[2] = {em, &sel}; bglBegin(GL_POINTS); - dm->foreachMappedFaceCenter(dm, draw_dm_face_centers__mapFunc, ptrs); + dm->foreachMappedFaceCenter(dm, draw_dm_face_centers__mapFunc, ptrs, DM_FOREACH_NOP); bglEnd(); } @@ -2133,7 +2133,7 @@ static void draw_dm_vert_normals(BMEditMesh *em, Scene *scene, Object *ob, Deriv calcDrawDMNormalScale(ob, &data); glBegin(GL_LINES); - dm->foreachMappedVert(dm, draw_dm_vert_normals__mapFunc, &data); + dm->foreachMappedVert(dm, draw_dm_vert_normals__mapFunc, &data, DM_FOREACH_USE_NORMAL); glEnd(); } @@ -2204,7 +2204,7 @@ static void draw_dm_verts(BMEditMesh *em, DerivedMesh *dm, const char sel, BMVer invert_m4(data.imat); bglBegin(GL_POINTS); - dm->foreachMappedVert(dm, draw_dm_verts__mapFunc, &data); + dm->foreachMappedVert(dm, draw_dm_verts__mapFunc, &data, DM_FOREACH_NOP); bglEnd(); } @@ -2534,7 +2534,7 @@ static void draw_dm_bweights(BMEditMesh *em, Scene *scene, DerivedMesh *dm) if (data.cd_layer_offset != -1) { glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE) + 2); bglBegin(GL_POINTS); - dm->foreachMappedVert(dm, draw_dm_bweights__mapFunc, &data); + dm->foreachMappedVert(dm, draw_dm_bweights__mapFunc, &data, DM_FOREACH_NOP); bglEnd(); } } @@ -7359,7 +7359,7 @@ static void bbs_obmode_mesh_verts(Object *ob, DerivedMesh *dm, int offset) data.offset = (void *)(intptr_t) offset; glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE)); bglBegin(GL_POINTS); - dm->foreachMappedVert(dm, bbs_obmode_mesh_verts__mapFunc, &data); + dm->foreachMappedVert(dm, bbs_obmode_mesh_verts__mapFunc, &data, DM_FOREACH_NOP); bglEnd(); glPointSize(1.0); } @@ -7382,7 +7382,7 @@ static void bbs_mesh_verts(BMEditMesh *em, DerivedMesh *dm, int offset) glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE)); bglBegin(GL_POINTS); - dm->foreachMappedVert(dm, bbs_mesh_verts__mapFunc, ptrs); + dm->foreachMappedVert(dm, bbs_mesh_verts__mapFunc, ptrs, DM_FOREACH_NOP); bglEnd(); glPointSize(1.0); } @@ -7448,7 +7448,7 @@ static void bbs_mesh_solid_EM(BMEditMesh *em, Scene *scene, View3D *v3d, glPointSize(UI_GetThemeValuef(TH_FACEDOT_SIZE)); bglBegin(GL_POINTS); - dm->foreachMappedFaceCenter(dm, bbs_mesh_solid__drawCenter, ptrs); + dm->foreachMappedFaceCenter(dm, bbs_mesh_solid__drawCenter, ptrs, DM_FOREACH_NOP); bglEnd(); } diff --git a/source/blender/editors/space_view3d/view3d_iterators.c b/source/blender/editors/space_view3d/view3d_iterators.c index 0490d8763d8..d13ab15d837 100644 --- a/source/blender/editors/space_view3d/view3d_iterators.c +++ b/source/blender/editors/space_view3d/view3d_iterators.c @@ -124,7 +124,7 @@ void meshobject_foreachScreenVert( ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */ } - dm->foreachMappedVert(dm, meshobject_foreachScreenVert__mapFunc, &data); + dm->foreachMappedVert(dm, meshobject_foreachScreenVert__mapFunc, &data, DM_FOREACH_NOP); dm->release(dm); } @@ -166,7 +166,7 @@ void mesh_foreachScreenVert( } EDBM_index_arrays_ensure(vc->em, BM_VERT); - dm->foreachMappedVert(dm, mesh_foreachScreenVert__mapFunc, &data); + dm->foreachMappedVert(dm, mesh_foreachScreenVert__mapFunc, &data, DM_FOREACH_NOP); dm->release(dm); } @@ -262,7 +262,7 @@ void mesh_foreachScreenFace( data.clip_flag = clip_flag; EDBM_index_arrays_ensure(vc->em, BM_FACE); - dm->foreachMappedFaceCenter(dm, mesh_foreachScreenFace__mapFunc, &data); + dm->foreachMappedFaceCenter(dm, mesh_foreachScreenFace__mapFunc, &data, DM_FOREACH_NOP); dm->release(dm); } diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index fb7bbdaa178..a2dd7d510bd 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -343,7 +343,7 @@ static void make_trans_verts(Object *obedit, float min[3], float max[3], int mod if (transvmain && em->derivedCage) { EDBM_index_arrays_ensure(em, BM_VERT); - em->derivedCage->foreachMappedVert(em->derivedCage, set_mapped_co, userdata); + em->derivedCage->foreachMappedVert(em->derivedCage, set_mapped_co, userdata, DM_FOREACH_NOP); } } else if (obedit->type == OB_ARMATURE) { diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c index ea3687ad715..e9d71d37e42 100644 --- a/source/blender/editors/util/crazyspace.c +++ b/source/blender/editors/util/crazyspace.c @@ -126,7 +126,7 @@ float *crazyspace_get_mapped_editverts(Scene *scene, Object *obedit) userData.vertexcos = vertexcos; userData.flags = flags; - dm->foreachMappedVert(dm, make_vertexcos__mapFunc, &userData); + dm->foreachMappedVert(dm, make_vertexcos__mapFunc, &userData, DM_FOREACH_NOP); dm->release(dm); |