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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-21 14:13:44 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-21 14:13:44 +0400
commit0c4cc6c53f7ac29c3431106b8cae9a87db742389 (patch)
tree1a774cbb16c2b0d94bb5d6c7c51a55e5273e87f4 /source
parentbc0e3ffc0c3fee50926ef4e100f03bfad5178d62 (diff)
Related to #35452: show warning when unwrapping object with negative scale, same
as we already do for non-uniform scale.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index 0d2f467767a..961893aebed 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -250,7 +250,7 @@ static int PHashSizes[] = {
};
#define PHASH_hash(ph, item) (((uintptr_t) (item)) % ((unsigned int) (ph)->cursize))
-#define PHASH_edge(v1, v2) ((v1) ^ (v2))
+#define PHASH_edge(v1, v2) (((v1) < (v2)) ? ((v1) * 39) ^ ((v2) * 31) : ((v1) * 31) ^ ((v2) * 39))
static PHash *phash_new(PHashLink **list, int sizehint)
{
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 1a32d9007c9..8d7b8dc4e28 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -1184,6 +1184,9 @@ static int unwrap_exec(bContext *C, wmOperator *op)
if (!(fabsf(obsize[0] - obsize[1]) < 1e-4f && fabsf(obsize[1] - obsize[2]) < 1e-4f))
BKE_report(op->reports, RPT_INFO,
"Object has non-uniform scale, unwrap will operate on a non-scaled version of the mesh");
+ else if (is_negative_m4(obedit->obmat))
+ BKE_report(op->reports, RPT_INFO,
+ "Object has negative scale, unwrap will operate on a non-flipped version of the mesh");
/* remember last method for live unwrap */
if (RNA_struct_property_is_set(op->ptr, "method"))