Object: don't flip scale when setting dimensions
authorCampbell Barton <ideasman42@gmail.com>
Fri, 4 Jan 2019 08:58:18 +0000 (19:58 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 4 Jan 2019 08:58:18 +0000 (19:58 +1100)
source/blender/blenkernel/intern/object.c

index 80a59216f609ecba714bcbdb8c5b3dfed9b9d381..14fafc130f4bbdf05f095d6639c5a683b5d693cd 100644 (file)
@@ -2563,7 +2563,7 @@ void BKE_object_dimensions_set(Object *ob, const float value[3], int axis_mask)
                for (int i = 0; i < 3; i++) {
                        if (((1 << i) & axis_mask) == 0) {
                                if (len[i] > 0.0f) {
-                                       ob->size[i] = value[i] / len[i];
+                                       ob->size[i] = copysignf(value[i] / len[i], ob->size[i]);
                                }
                        }
                }