Fix #115715: Boolean behaves as if the object is on it's origin

Resolve regression in [0] which replaced a null check with an
identity comparison. This wasn't correct as the null check indicated
that transform was applied or not, where situations that require a
transform could have an identity matrix.

Resolve by checking if the matrix that would transform vertices is an
identity which is a reliable way to know if any transformation is needed.

Ref: !115736

[0]: e24c7f1954
This commit is contained in:
Z-Map
2023-12-04 02:03:10 +01:00
committed by Campbell Barton
parent 20fd012adb
commit c9dd5ce4cc

View File

@@ -316,8 +316,8 @@ static IMesh meshes_to_imesh(Span<const Mesh *> meshes,
/* Allocate verts
* Skip the matrix multiplication for each point when there is no transform for a mesh,
* for example when the first mesh is already in the target space. (Note the logic
* directly above, which uses an identity matrix with a null input transform). */
if (obmats.is_empty() || obmats[mi] == float4x4::identity()) {
* directly above, which uses an identity matrix with an empty input transform). */
if (obmats.is_empty() || r_info->to_target_transform[mi] == float4x4::identity()) {
threading::parallel_for(vert_positions.index_range(), 2048, [&](IndexRange range) {
for (int i : range) {
float3 co = vert_positions[i];