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_manipulator.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_manipulator.c')
-rw-r--r-- | source/blender/src/transform_manipulator.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/src/transform_manipulator.c b/source/blender/src/transform_manipulator.c index 6e6ae53a651..36acfcd4a59 100644 --- a/source/blender/src/transform_manipulator.c +++ b/source/blender/src/transform_manipulator.c @@ -1328,9 +1328,9 @@ static void draw_manipulator_rotate_cyl(float mat[][4], int moving, int drawflag /* ********************************************* */ -static float get_manipulator_drawsize(ScrArea *sa) +float get_drawsize(View3D *v3d) { - View3D *v3d= sa->spacedata.first; + ScrArea *sa = v3d->area; float size, vec[3], len1, len2; /* size calculus, depending ortho/persp settings, like initgrabz() */ @@ -1341,7 +1341,7 @@ static float get_manipulator_drawsize(ScrArea *sa) VECCOPY(vec, v3d->persinv[1]); len2= Normalise(vec); - size*= (0.01f*(float)U.tw_size)*(len1>len2?len1:len2); + size*= 0.01f*(len1>len2?len1:len2); /* correct for window size to make widgets appear fixed size */ if(sa->winx > sa->winy) size*= 1000.0f/(float)sa->winx; @@ -1350,6 +1350,16 @@ static float get_manipulator_drawsize(ScrArea *sa) return size; } +static float get_manipulator_drawsize(ScrArea *sa) +{ + View3D *v3d= sa->spacedata.first; + float size = get_drawsize(v3d); + + size*= (float)U.tw_size; + + return size; +} + /* exported to transform_constraints.c */ /* mat, vec = default orientation and location */ /* type = transform type */ |