Commit: d33557c52e1ac221078c66d1b480fb3aaa3f6cd4
Author: Campbell Barton
Date:   Wed Aug 26 22:23:41 2015 +1000
Branches: master
https://developer.blender.org/rBd33557c52e1ac221078c66d1b480fb3aaa3f6cd4

Correct fix for T39161: Scaling & snap

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

M       source/blender/editors/transform/transform_snap.c

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

diff --git a/source/blender/editors/transform/transform_snap.c 
b/source/blender/editors/transform/transform_snap.c
index 28039a7..dfa5032 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -821,7 +821,7 @@ static void ApplySnapResize(TransInfo *t, float vec[3])
                dist = ResizeBetween(t, t->tsnap.snapTarget, point);
        }
 
-       copy_v3_fl(vec, dist * M_SQRT3);
+       copy_v3_fl(vec, dist);
 }
 
 /********************** DISTANCE **************************/
@@ -888,6 +888,8 @@ static float ResizeBetween(TransInfo *t, const float p1[3], 
const float p2[3])
        sub_v3_v3v3(d1, p1, t->center_global);
        sub_v3_v3v3(d2, p2, t->center_global);
        
+       project_v3_v3v3(d1, d1, d2);
+
        if (t->con.applyRot != NULL && (t->con.mode & CON_APPLY)) {
                mul_m3_v3(t->con.pmtx, d1);
                mul_m3_v3(t->con.pmtx, d2);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to