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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-02 17:36:10 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-02 17:36:10 +0400
commit87bc16a9a0d76eca88dbb6ac677d18a3208fba28 (patch)
treeafa656c21a60fcdb44f7c10235a6d62a9a80eb0c /source/blender/editors/uvedit
parent0a0c8a4a2255c3007a4d1909deabb123a142941b (diff)
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.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c6
1 files 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"))