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:
authorClément Foucault <foucault.clem@gmail.com>2019-05-10 15:46:01 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-10 15:48:33 +0300
commitc0b8d071a75403c9dcb020420db074e7bb17e887 (patch)
treee0f4d322df40011bd96136503e5f6a975c91f586 /source/blender/depsgraph/intern/depsgraph_query_iter.cc
parent259ebdd017255c6ab8bd456d7f654d589b13872b (diff)
Fix T64284 Mirrored Instances have flipped normals/face orientation
It was a missing invert matrix update and also setting the OB_NEG_SCALE. This defeats the purpose of not computing it in the draw manager but this is more local and is have not a dramatic impact on performance.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_query_iter.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query_iter.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_query_iter.cc b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
index a9fe7c6d5e7..4bc2ab557ec 100644
--- a/source/blender/depsgraph/intern/depsgraph_query_iter.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
@@ -158,7 +158,13 @@ bool deg_objects_dupli_iterator_next(BLI_Iterator *iter)
continue;
}
+ /* This could be avoided by refactoring make_dupli() in order to track all negative scaling
+ * recursively. */
+ bool is_neg_scale = is_negative_m4(dob->mat);
+ SET_FLAG_FROM_TEST(data->temp_dupli_object.transflag, is_neg_scale, OB_NEG_SCALE);
+
copy_m4_m4(data->temp_dupli_object.obmat, dob->mat);
+ invert_m4_m4(data->temp_dupli_object.imat, data->temp_dupli_object.obmat);
iter->current = &data->temp_dupli_object;
BLI_assert(DEG::deg_validate_copy_on_write_datablock(&data->temp_dupli_object.id));
return true;