Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-02-18 07:43:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-18 07:43:55 +0300
commitcc10d8653575e0d299b330521c98027f1dc8da36 (patch)
treee48d07b85d634119b9b1c52fe8dc480949eba7ba /source/blender/editors/object
parent4719e7ec7a9c3095117bd2b0b08aeb1d72c62d98 (diff)
DNA: rename Object.size -> scale
Resolves a common cause of confusion.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c2
-rw-r--r--source/blender/editors/object/object_transform.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 2f1ae2a1c39..e9aaaccb3d2 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -440,7 +440,7 @@ static int object_add_exec(bContext *C, wmOperator *op)
if (ob->type == OB_LATTICE) {
/* lattice is a special case!
* we never want to scale the obdata since that is the rest-state */
- copy_v3_fl(ob->size, radius);
+ copy_v3_fl(ob->scale, radius);
}
else {
BKE_object_obdata_size_init(ob, radius);
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 31c9a428f3c..00374c12473 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -222,15 +222,15 @@ static void object_clear_scale(Object *ob, const bool clear_delta)
{
/* clear scale factors which are not locked */
if ((ob->protectflag & OB_LOCK_SCALEX) == 0) {
- ob->size[0] = 1.0f;
+ ob->scale[0] = 1.0f;
if (clear_delta) ob->dscale[0] = 1.0f;
}
if ((ob->protectflag & OB_LOCK_SCALEY) == 0) {
- ob->size[1] = 1.0f;
+ ob->scale[1] = 1.0f;
if (clear_delta) ob->dscale[1] = 1.0f;
}
if ((ob->protectflag & OB_LOCK_SCALEZ) == 0) {
- ob->size[2] = 1.0f;
+ ob->scale[2] = 1.0f;
if (clear_delta) ob->dscale[2] = 1.0f;
}
}
@@ -630,7 +630,7 @@ static int apply_objects_internal(
continue;
if (apply_scale)
- BKE_tracking_reconstruction_scale(&clip->tracking, ob->size);
+ BKE_tracking_reconstruction_scale(&clip->tracking, ob->scale);
}
else if (ob->type == OB_EMPTY) {
/* It's possible for empties too, even though they don't
@@ -649,7 +649,7 @@ static int apply_objects_internal(
(apply_rot == false) &&
(apply_scale == true))
{
- float max_scale = max_fff(fabsf(ob->size[0]), fabsf(ob->size[1]), fabsf(ob->size[2]));
+ float max_scale = max_fff(fabsf(ob->scale[0]), fabsf(ob->scale[1]), fabsf(ob->scale[2]));
ob->empty_drawsize *= max_scale;
}
}
@@ -680,7 +680,7 @@ static int apply_objects_internal(
if (apply_loc)
zero_v3(ob->loc);
if (apply_scale)
- ob->size[0] = ob->size[1] = ob->size[2] = 1.0f;
+ ob->scale[0] = ob->scale[1] = ob->scale[2] = 1.0f;
if (apply_rot) {
zero_v3(ob->rot);
unit_qt(ob->quat);
@@ -1402,10 +1402,10 @@ static void object_apply_rotation(Object *ob, const float rmat[3][3])
float rmat4[4][4];
copy_m4_m3(rmat4, rmat);
- copy_v3_v3(size, ob->size);
+ copy_v3_v3(size, ob->scale);
copy_v3_v3(loc, ob->loc);
BKE_object_apply_mat4(ob, rmat4, true, true);
- copy_v3_v3(ob->size, size);
+ copy_v3_v3(ob->scale, size);
copy_v3_v3(ob->loc, loc);
}
/* We may want to extract this to: BKE_object_apply_location */