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-04-16 07:18:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-16 07:19:31 +0400
commit4769b44bdda7999bb69de9602f10dced3de2affe (patch)
treeb8dda762d4f840ab62ab8a89fed929afa56f8381
parent70f089b6f5b768b7ee0d6bc98d64a202e99fc22f (diff)
Fix T39745: "Origin to geometry" not working with Text objects. (regression)
-rw-r--r--source/blender/editors/object/object_transform.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 3493f6bf778..2dd56745373 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -881,7 +881,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
Curve *cu = ob->data;
- if (cu->bb == NULL && (centermode != ORIGIN_TO_CURSOR)) {
+ if (ob->bb == NULL && (centermode != ORIGIN_TO_CURSOR)) {
/* do nothing*/
}
else {
@@ -889,8 +889,9 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
/* done */
}
else {
- cent[0] = 0.5f * (cu->bb->vec[4][0] + cu->bb->vec[0][0]);
- cent[1] = 0.5f * (cu->bb->vec[0][1] + cu->bb->vec[2][1]) - 0.5f; /* extra 0.5 is the height o above line */
+ /* extra 0.5 is the height o above line */
+ cent[0] = 0.5f * (ob->bb->vec[4][0] + ob->bb->vec[0][0]);
+ cent[1] = 0.5f * (ob->bb->vec[0][1] + ob->bb->vec[2][1]);
}
cent[2] = 0.0f;