[Bf-blender-cvs] [c0b8d071a75] master: Fix T64284 Mirrored Instances have flipped normals/face orientation
Clément Foucault
noreply at git.blender.org
Fri May 10 14:48:37 CEST 2019
Commit: c0b8d071a75403c9dcb020420db074e7bb17e887
Author: Clément Foucault
Date: Fri May 10 14:46:01 2019 +0200
Branches: master
https://developer.blender.org/rBc0b8d071a75403c9dcb020420db074e7bb17e887
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.
===================================================================
M source/blender/depsgraph/intern/depsgraph_query_iter.cc
===================================================================
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;
More information about the Bf-blender-cvs
mailing list