[Bf-blender-cvs] [66377b89da0] blender2.8: Fix T51251: Armature/Normal-button scaled twice

Campbell Barton noreply at git.blender.org
Thu Apr 20 14:09:20 CEST 2017


Commit: 66377b89da08f46a27d48fd918fcee0daa505429
Author: Campbell Barton
Date:   Thu Apr 20 22:10:25 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB66377b89da08f46a27d48fd918fcee0daa505429

Fix T51251: Armature/Normal-button scaled twice

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

M	source/blender/gpu/intern/gpu_matrix.c

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

diff --git a/source/blender/gpu/intern/gpu_matrix.c b/source/blender/gpu/intern/gpu_matrix.c
index 8bf17653850..c586e75c050 100644
--- a/source/blender/gpu/intern/gpu_matrix.c
+++ b/source/blender/gpu/intern/gpu_matrix.c
@@ -348,14 +348,17 @@ void gpuTranslate3fv(const float vec[3])
 
 void gpuScaleUniform(float factor)
 {
+#if SUPPORT_LEGACY_MATRIX
+	{
+		glScalef(factor, factor, factor); /* always scale Z since we can't distinguish 2D from 3D */
+		state.dirty = true;
+		return;
+	}
+#endif
 	Mat4 m;
 	scale_m4_fl(m, factor);
+	m[2][2] = 1.0;
 	gpuMultMatrix(m);
-
-#if SUPPORT_LEGACY_MATRIX
-	glScalef(factor, factor, factor); /* always scale Z since we can't distinguish 2D from 3D */
-	state.dirty = true;
-#endif
 }
 
 void gpuScale2f(float x, float y)




More information about the Bf-blender-cvs mailing list