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>2014-05-05 09:41:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-05-05 09:47:25 +0400
commit38a430c0272261eb5b40531008ac300ccdae3a18 (patch)
tree658dee85b3ff5cdf3f2fb1f620a6e062344af368 /source/blender/editors/object/object_transform.c
parentb82d639f3dea92fa9be7e38c5e76617dc07251a9 (diff)
Fix T40029: Apply transform to empties reset their location
also add check for negative scale
Diffstat (limited to 'source/blender/editors/object/object_transform.c')
-rw-r--r--source/blender/editors/object/object_transform.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 2dd56745373..6e59f9f4aea 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -566,8 +566,14 @@ static int apply_objects_internal(bContext *C, ReportList *reports, bool apply_l
* and is something that many users would be willing to
* sacrifice for having an easy way to do this.
*/
- float max_scale = MAX3(ob->size[0], ob->size[1], ob->size[2]);
- ob->empty_drawsize *= max_scale;
+
+ if ((apply_loc == false) &&
+ (apply_rot == false) &&
+ (apply_scale == true))
+ {
+ float max_scale = max_fff(fabsf(ob->size[0]), fabsf(ob->size[1]), fabsf(ob->size[2]));
+ ob->empty_drawsize *= max_scale;
+ }
}
else {
continue;