diff options
author | Martin Poirier <theeth@yahoo.com> | 2006-12-21 23:45:57 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2006-12-21 23:45:57 +0300 |
commit | 39c0f6dd83b4474da736b692c6bd628c08682348 (patch) | |
tree | 56f9c8ac7c4b0962ca2c2dcf8741a8174a5efc39 /source/blender/src/transform_snap.c | |
parent | 120ac487284fd806d06df26d29bd0cb61038d0b5 (diff) |
=== Transform Snap ===
The circle drawn around the snap point is now truely constant regardless of zoom and size of the window. That size if linearly proportional to the vertex size (bigger vertex -> bigger circle).
Diffstat (limited to 'source/blender/src/transform_snap.c')
-rw-r--r-- | source/blender/src/transform_snap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/src/transform_snap.c b/source/blender/src/transform_snap.c index bf307eb5825..3a4bb5087a4 100644 --- a/source/blender/src/transform_snap.c +++ b/source/blender/src/transform_snap.c @@ -82,8 +82,13 @@ void drawSnapping(TransInfo *t) if ((t->tsnap.status & (SNAP_ON|POINT_INIT|TARGET_INIT)) == (SNAP_ON|POINT_INIT|TARGET_INIT) && (G.qual & LR_CTRLKEY)) { float unitmat[4][4]; + float size; char col[4]; + size = get_drawsize(G.vd); + + size *= 0.5f * BIF_GetThemeValuef(TH_VERTEX_SIZE); + BIF_GetThemeColor3ubv(TH_TRANSFORM, col); glColor4ub(col[0], col[1], col[2], 128); @@ -95,7 +100,7 @@ void drawSnapping(TransInfo *t) glRotatef( -360.0f*saacos(G.vd->viewquat[0])/(float)M_PI, G.vd->viewquat[1], G.vd->viewquat[2], G.vd->viewquat[3]); Mat4One(unitmat); - drawcircball(GL_LINE_LOOP, unitmat[3], 0.1f, unitmat); + drawcircball(GL_LINE_LOOP, unitmat[3], size, unitmat); glPopMatrix(); } } |