diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-07-26 14:54:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-07-26 14:58:47 +0300 |
commit | 28b1c708958d10f107f386a47e4c8c26a9e6f1ad (patch) | |
tree | 91571278cafe44bb4957d5d54ea7c89e60588721 /source/blender | |
parent | a8d058dbf42f7ade5edf73425a0064cb1f4cd148 (diff) |
Fix T79272: Dimensions fail on negative scaled axis
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 33c5343e410..b7fd6a50e6d 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -3062,9 +3062,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; } } } |