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:
@@ -1171,7 +1171,7 @@ static int unwrap_exec(bContext *C, wmOperator *op)
|
|||||||
int correct_aspect = RNA_boolean_get(op->ptr, "correct_aspect");
|
int correct_aspect = RNA_boolean_get(op->ptr, "correct_aspect");
|
||||||
int use_subsurf = RNA_boolean_get(op->ptr, "use_subsurf_data");
|
int use_subsurf = RNA_boolean_get(op->ptr, "use_subsurf_data");
|
||||||
int subsurf_level = RNA_int_get(op->ptr, "uv_subsurf_level");
|
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;
|
short implicit = 0;
|
||||||
|
|
||||||
if (!uvedit_have_selection(scene, em, implicit)) {
|
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);
|
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,
|
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 */
|
/* remember last method for live unwrap */
|
||||||
if (RNA_struct_property_is_set(op->ptr, "method"))
|
if (RNA_struct_property_is_set(op->ptr, "method"))
|
||||||
|
Reference in New Issue
Block a user