fix error running ED_view3d_project_float_v3_m4 on 2d vec (thanks Sergey for pointing...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 1 May 2013 17:03:00 +0000 (17:03 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 1 May 2013 17:03:00 +0000 (17:03 +0000)
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_knife_project.c

index 618ff6ce737359803b16c708d2f773b7435b6d3b..afd151f3c77f690a21f6c91391361d4f47312060 100644 (file)
@@ -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);
 
index 8d385a7e6ff3e42eb107c202d4e2c5acb41a2d24..f473939d0aa5a3e97f3356e7692f811ee8fc1fd8 100644 (file)
@@ -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]);