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.
This commit is contained in:
Brecht Van Lommel 2012-11-02 13:36:10 +00:00
parent 0a0c8a4a22
commit 87bc16a9a0

@ -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"))