[Bf-blender-cvs] [25fc84bf2ee] master: Fix wrong vector size functions used in knife tool

Sergey Sharybin noreply at git.blender.org
Tue Jul 14 10:43:49 CEST 2020


Commit: 25fc84bf2eef70c5aa0cc719e2155858a2ce63b1
Author: Sergey Sharybin
Date:   Tue Jul 14 10:42:35 2020 +0200
Branches: master
https://developer.blender.org/rB25fc84bf2eef70c5aa0cc719e2155858a2ce63b1

Fix wrong vector size functions used in knife tool

Should not use copy_v3_v3 on a 2 element vectors.

===================================================================

M	source/blender/editors/mesh/editmesh_knife.c

===================================================================

diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 152c7656786..0394874e8c1 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -2123,7 +2123,7 @@ static KnifeVert *knife_find_closest_vert_of_face(KnifeTool_OpData *kcd,
             !ED_view3d_clipping_test(kcd->vc.rv3d, kfv->cageco, true)) {
           curv = kfv;
           curdis_sq = dis_sq;
-          copy_v3_v3(cur_kfv_sco, kfv_sco);
+          copy_v2_v2(cur_kfv_sco, kfv_sco);
         }
       }
     }
@@ -2136,7 +2136,7 @@ static KnifeVert *knife_find_closest_vert_of_face(KnifeTool_OpData *kcd,
 
       /* update mouse coordinates to the snapped-to vertex's screen coordinates
        * this is important for angle snap, which uses the previous mouse position */
-      copy_v3_v3(kcd->curr.mval, cur_kfv_sco);
+      copy_v2_v2(kcd->curr.mval, cur_kfv_sco);
     }
 
     return curv;



More information about the Bf-blender-cvs mailing list