Fix T79272: Dimensions fail on negative scaled axis

This commit is contained in:
Campbell Barton 2020-07-26 21:54:08 +10:00 committed by Jeroen Bakker
parent 46c3ef5715
commit 38aa78c6f4
Notes: blender-bot 2024-03-25 12:30:38 +01:00
Referenced by issue #79272, Dimensions do not work on negative scaled axis
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
1 changed files with 3 additions and 3 deletions

View File

@ -3005,9 +3005,9 @@ void BKE_object_dimensions_set_ex(Object *ob,
}
}
if (len[i] > 0.0f) {
ob->scale[i] = copysignf(value[i] / len[i], ob->scale[i]);
const float scale = copysignf(value[i] / len[i], ob->scale[i]);
if (isfinite(scale)) {
ob->scale[i] = scale;
}
}
}