From 29f6357ddceb112159e2b2e388924ed3c451f6c0 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 30 Nov 2009 19:43:59 +0000 Subject: [PATCH] Bugfix: PET circle not drawn correctly in edit mode. --- source/blender/editors/transform/transform_constraints.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index f59803924d5..1a810d4adc3 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -668,6 +668,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) if (t->flag & T_PROP_EDIT) { RegionView3D *rv3d = CTX_wm_region_view3d(C); float tmat[4][4], imat[4][4]; + float center[3]; UI_ThemeColor(TH_GRID); @@ -684,9 +685,11 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) glPushMatrix(); + VECCOPY(center, t->center); + if((t->spacetype == SPACE_VIEW3D) && t->obedit) { - glMultMatrixf(t->obedit->obmat); /* because t->center is in local space */ + mul_m4_v3(t->obedit->obmat, center); /* because t->center is in local space */ } else if(t->spacetype == SPACE_IMAGE) { @@ -697,7 +700,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) } set_inverted_drawing(1); - drawcircball(GL_LINE_LOOP, t->center, t->prop_size, imat); + drawcircball(GL_LINE_LOOP, center, t->prop_size, imat); set_inverted_drawing(0); glPopMatrix();