Fix T40029: Apply transform to empties reset their location

also add check for negative scale
This commit is contained in:
Campbell Barton 2014-05-05 15:41:08 +10:00
parent b82d639f3d
commit 38a430c027
Notes: blender-bot 2024-03-25 12:30:38 +01:00
Referenced by issue #40253, cyclesbakind-uvs
Referenced by issue #40212, instanded group objects don't render(blender internal)
Referenced by issue #40109, enslaved Metaball in particle system
Referenced by issue #40077, crash trying to bake to active TS n-maps
Referenced by issue #40029, Apply hook location returns it to 0,0,0
1 changed files with 8 additions and 2 deletions

View File

@ -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;