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:
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index 2161d4989db..72c38be5398 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -1135,7 +1135,11 @@ static PFace *p_face_add_fill(PChart *chart, PVert *v1, PVert *v2, PVert *v3)
static PBool p_quad_split_direction(PHandle *handle, float **co, PHashKey *vkeys)
{
- float fac = len_v3v3(co[0], co[2]) - len_v3v3(co[1], co[3]);
+ /* slight bias to prefer one edge over the other in case they are equal, so
+ * that in symmetric models we choose the same split direction instead of
+ * depending on floating point errors to decide */
+ float bias = 1.0f + 1e-6f;
+ float fac = len_v3v3(co[0], co[2])*bias - len_v3v3(co[1], co[3]);
PBool dir = (fac <= 0.0f);
/* the face exists check is there because of a special case: when