[Bf-blender-cvs] [06505c52645] master: Fix T39925: Set Origin to Geometry on a new text object moves the origin away from the object

Bastien Montagne noreply at git.blender.org
Mon Jul 17 12:56:57 CEST 2017


Commit: 06505c5264539a255620c9c8898c5a879555b10e
Author: Bastien Montagne
Date:   Mon Jul 17 12:56:12 2017 +0200
Branches: master
https://developer.blender.org/rB06505c5264539a255620c9c8898c5a879555b10e

Fix T39925: Set Origin to Geometry on a new text object moves the origin away from the object

No need to take into account font size here...

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

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 4d7d7df0d2f..47a3f79b0b4 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -923,8 +923,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
 
 					cent[2] = 0.0f;
 
-					cu->xof = cu->xof - (cent[0] / cu->fsize);
-					cu->yof = cu->yof - (cent[1] / cu->fsize);
+					cu->xof = cu->xof - cent[0];
+					cu->yof = cu->yof - cent[1];
 
 					tot_change++;
 					cu->id.tag |= LIB_TAG_DOIT;




More information about the Bf-blender-cvs mailing list