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.
This commit is contained in:
parent
259ebdd017
commit
c0b8d071a7
Notes:
blender-bot
2023-12-22 20:14:11 +01:00
Referenced by issue #64284, Mirroed Collection Intances have flipped normals/face orientation.
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue