[Bf-blender-cvs] [49c29dc82f3] master: Fix T52066: Grid Mesh UV's aren't correct

Campbell Barton noreply at git.blender.org
Sat Jul 15 15:53:19 CEST 2017


Commit: 49c29dc82f3c249f6fceb5df4ee55272c023b0c5
Author: Campbell Barton
Date:   Sun Jul 16 00:02:09 2017 +1000
Branches: master
https://developer.blender.org/rB49c29dc82f3c249f6fceb5df4ee55272c023b0c5

Fix T52066: Grid Mesh UV's aren't correct

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

M	source/blender/bmesh/operators/bmo_primitive.c

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

diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c
index cca0f7387cd..d8f83d786b4 100644
--- a/source/blender/bmesh/operators/bmo_primitive.c
+++ b/source/blender/bmesh/operators/bmo_primitive.c
@@ -839,7 +839,7 @@ void BM_mesh_calc_uvs_grid(
 	const float dx = 1.0f / (float)(x_segments - 1);
 	const float dy = 1.0f / (float)(y_segments - 1);
 	float x = 0.0f;
-	float y = 0.0f;
+	float y = dy;
 
 	int loop_index;
 
@@ -854,16 +854,16 @@ void BM_mesh_calc_uvs_grid(
 
 			switch (loop_index) {
 				case 0:
-					x += dx;
+					y -= dy;
 					break;
 				case 1:
-					y += dy;
+					x += dx;
 					break;
 				case 2:
-					x -= dx;
+					y += dy;
 					break;
 				case 3:
-					y -= dy;
+					x -= dx;
 					break;
 				default:
 					break;




More information about the Bf-blender-cvs mailing list