[Bf-blender-cvs] [38a430c] master: Fix T40029: Apply transform to empties reset their location

Campbell Barton noreply at git.blender.org
Mon May 5 07:48:13 CEST 2014


Commit: 38a430c0272261eb5b40531008ac300ccdae3a18
Author: Campbell Barton
Date:   Mon May 5 15:41:08 2014 +1000
https://developer.blender.org/rB38a430c0272261eb5b40531008ac300ccdae3a18

Fix T40029: Apply transform to empties reset their location

also add check for negative scale

===================================================================

M	source/blender/editors/object/object_transform.c

===================================================================

diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 2dd5674..6e59f9f 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;




More information about the Bf-blender-cvs mailing list