Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatc <matc>2019-07-29 07:26:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-07-29 07:28:02 +0300
commita542f50b51af0167acc55d4cf2b06490a704ce93 (patch)
treef955582efbc6a59bca9fe34a49e46a2cb4292a13 /source/blender/bmesh
parenta49838ccb0f647aa5eab84a4858591f6231283ad (diff)
Fix T67523: Incorrect UV's for grid primitive
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/operators/bmo_primitive.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c
index cf3d6b8bf56..2eedefe7980 100644
--- a/source/blender/bmesh/operators/bmo_primitive.c
+++ b/source/blender/bmesh/operators/bmo_primitive.c
@@ -807,6 +807,7 @@ void BM_mesh_calc_uvs_grid(BMesh *bm,
const float dx = 1.0f / (float)(x_segments - 1);
const float dy = 1.0f / (float)(y_segments - 1);
+ const float dx_wrap = 1.0 - (dx / 2.0f);
float x = 0.0f;
float y = dy;
@@ -844,7 +845,7 @@ void BM_mesh_calc_uvs_grid(BMesh *bm,
}
x += dx;
- if (x >= 1.0f) {
+ if (x >= dx_wrap) {
x = 0.0f;
y += dy;
}