From 87bc16a9a0d76eca88dbb6ac677d18a3208fba28 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 2 Nov 2012 13:36:10 +0000 Subject: [PATCH] UV editor: change unwrap warning about object non-unit size to only warning about non-uniform scale, otherwise it gives warnings for cases when it's not needed. --- source/blender/editors/uvedit/uvedit_unwrap_ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 8b61aaa93d1..393c119b347 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -1171,7 +1171,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) int correct_aspect = RNA_boolean_get(op->ptr, "correct_aspect"); int use_subsurf = RNA_boolean_get(op->ptr, "use_subsurf_data"); int subsurf_level = RNA_int_get(op->ptr, "uv_subsurf_level"); - float obsize[3], unitsize[3] = {1.0f, 1.0f, 1.0f}; + float obsize[3]; short implicit = 0; if (!uvedit_have_selection(scene, em, implicit)) { @@ -1184,9 +1184,9 @@ static int unwrap_exec(bContext *C, wmOperator *op) } mat4_to_size(obsize, obedit->obmat); - if (!compare_v3v3(obsize, unitsize, 1e-4f)) + if (!(fabsf(obsize[0] - obsize[1]) < 1e-4f && fabsf(obsize[1] - obsize[2]) < 1e-4f)) BKE_report(op->reports, RPT_INFO, - "Object scale is not 1.0, unwrap will operate on a non-scaled version of the mesh"); + "Object has non-uniform scale, unwrap will operate on a non-scaled version of the mesh"); /* remember last method for live unwrap */ if (RNA_struct_property_is_set(op->ptr, "method"))