diff options
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 5a7f82dda13..9e773298d4a 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -1207,8 +1207,6 @@ void lattice_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, BPo int i, N = lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw; short s[2] = {IS_CLIPPED, 0}; - ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* so view3d_project_short works */ - for (i=0; i<N; i++, bp++, co+=3) { if (bp->hide==0) { view3d_project_short_clip(vc->ar, dl?co:bp->vec, s); @@ -1303,6 +1301,10 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob) /* ***************** ******************** */ +/* Note! - foreach funcs should be called while drawing or directly after + * if not, ED_view3d_init_mats_rv3d() can be used for selection tools + * but would not give correct results with dupli's for eg. which dont + * use the object matrix in the useual way */ static void mesh_foreachScreenVert__mapFunc(void *userData, int index, float *co, float *no_f, short *no_s) { struct { void (*func)(void *userData, EditVert *eve, int x, int y, int index); void *userData; ViewContext vc; int clipVerts; } *data = userData; @@ -1332,7 +1334,6 @@ void mesh_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, EditVe data.userData = userData; data.clipVerts = clipVerts; - ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* so view3d_project_short works */ EM_init_index_arrays(vc->em, 1, 0, 0); dm->foreachMappedVert(dm, mesh_foreachScreenVert__mapFunc, &data); EM_free_index_arrays(); @@ -1375,7 +1376,6 @@ void mesh_foreachScreenEdge(ViewContext *vc, void (*func)(void *userData, EditEd data.userData = userData; data.clipVerts = clipVerts; - ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* so view3d_project_short works */ EM_init_index_arrays(vc->em, 0, 1, 0); dm->foreachMappedEdge(dm, mesh_foreachScreenEdge__mapFunc, &data); EM_free_index_arrays(); @@ -1405,7 +1405,6 @@ void mesh_foreachScreenFace(ViewContext *vc, void (*func)(void *userData, EditFa data.func = func; data.userData = userData; - ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* so view3d_project_short works */ EM_init_index_arrays(vc->em, 0, 0, 1); dm->foreachMappedFaceCenter(dm, mesh_foreachScreenFace__mapFunc, &data); EM_free_index_arrays(); @@ -1420,8 +1419,6 @@ void nurbs_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, Nurb Nurb *nu; int i; - ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* so view3d_project_short works */ - for (nu= cu->editnurb->first; nu; nu=nu->next) { if(nu->type == CU_BEZIER) { for (i=0; i<nu->pntsu; i++) { |