Bugfix: PET circle not drawn correctly in edit mode.
authorMartin Poirier <theeth@yahoo.com>
Mon, 30 Nov 2009 19:43:59 +0000 (19:43 +0000)
committerMartin Poirier <theeth@yahoo.com>
Mon, 30 Nov 2009 19:43:59 +0000 (19:43 +0000)
source/blender/editors/transform/transform_constraints.c

index f59803924d56119fa9f5b76b9a3171bfad2d685b..1a810d4adc3ff2e728b02cf9541fdf7dd7a80a90 100644 (file)
@@ -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();