From e5344adda3c49e737da1411988f6d72bd7446f05 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 1 May 2013 17:03:00 +0000 Subject: fix error running ED_view3d_project_float_v3_m4 on 2d vec (thanks Sergey for pointing out!), also remove redundant vector copy in knife project. --- source/blender/editors/mesh/editmesh_knife.c | 1 - source/blender/editors/mesh/editmesh_knife_project.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 618ff6ce737..afd151f3c77 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -335,7 +335,6 @@ static KnifeVert *new_knife_vert(KnifeTool_OpData *kcd, const float co[3], const copy_v3_v3(kfv->co, co); copy_v3_v3(kfv->cageco, cageco); - copy_v3_v3(kfv->sco, co); knife_project_v3(kcd, kfv->co, kfv->sco); diff --git a/source/blender/editors/mesh/editmesh_knife_project.c b/source/blender/editors/mesh/editmesh_knife_project.c index 8d385a7e6ff..f473939d0aa 100644 --- a/source/blender/editors/mesh/editmesh_knife_project.c +++ b/source/blender/editors/mesh/editmesh_knife_project.c @@ -89,7 +89,7 @@ static LinkNode *knifeproject_poly_from_object(ARegion *ar, Scene *scene, Object float (*mval)[2] = MEM_mallocN(sizeof(*mval) * (nu->pntsu + is_cyclic), __func__); for (bp = nu->bp, a = 0; a < nu->pntsu; a++, bp++) { - ED_view3d_project_float_v3_m4(ar, bp->vec, mval[a], projmat); + ED_view3d_project_float_v2_m4(ar, bp->vec, mval[a], projmat); } if (is_cyclic) { copy_v2_v2(mval[a], mval[0]); -- cgit v1.2.3