diff options
author | Ton Roosendaal <ton@blender.org> | 2011-01-08 19:54:38 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-01-08 19:54:38 +0300 |
commit | 6594b591de9fbbacb1c148f891cdfc963ba61a72 (patch) | |
tree | c0b2daa94e65da1c052ddf9d389d0f090bdc9675 /source/blender/editors/transform/transform.c | |
parent | 17dd29cb850927bf47e86db48e2d33c544cfc786 (diff) |
Proportional editing:
- Proportional circle size is printed in header
Allows you to find out if you make it smaller when it's large
- Proportional size is clipped with view3d clip-end now
- Added the size to rna, so you can inspect values via UI and py.
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index a0b80567361..981899083ce 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -741,6 +741,8 @@ int transformEvent(TransInfo *t, wmEvent *event) case TFM_MODAL_PROPSIZE_UP: if(t->flag & T_PROP_EDIT) { t->prop_size*= 1.1f; + if(t->spacetype==SPACE_VIEW3D) + t->prop_size= MIN2(t->prop_size, ((View3D *)t->view)->far); calculatePropRatio(t); } t->redraw |= TREDRAW_HARD; @@ -977,6 +979,8 @@ int transformEvent(TransInfo *t, wmEvent *event) case PADPLUSKEY: if(event->alt && t->flag & T_PROP_EDIT) { t->prop_size *= 1.1f; + if(t->spacetype==SPACE_VIEW3D) + t->prop_size= MIN2(t->prop_size, ((View3D *)t->view)->far); calculatePropRatio(t); } t->redraw= 1; @@ -2542,6 +2546,9 @@ static void headerResize(TransInfo *t, float vec[3], char *str) { else sprintf(str, "Scale X: %s Y: %s Z: %s%s %s", &tvec[0], &tvec[20], &tvec[40], t->con.text, t->proptext); } + + if (t->flag & (T_PROP_EDIT|T_PROP_CONNECTED)) + sprintf(str, "%s Proportional size: %.2f", str, t->prop_size); } #define SIGN(a) (a<-FLT_EPSILON?1:a>FLT_EPSILON?2:3) @@ -3165,6 +3172,9 @@ int Rotation(TransInfo *t, short UNUSED(mval[2])) sprintf(str, "Rot: %.2f%s %s", 180.0*final/M_PI, t->con.text, t->proptext); } + if (t->flag & (T_PROP_EDIT|T_PROP_CONNECTED)) + sprintf(str, "%s Proportional size: %.2f", str, t->prop_size); + t->values[0] = final; applyRotation(t, final, t->axis); @@ -3386,6 +3396,9 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str) { else sprintf(str, "Dx: %s Dy: %s Dz: %s (%s)%s %s %s", &tvec[0], &tvec[20], &tvec[40], distvec, t->con.text, t->proptext, &autoik[0]); } + + if (t->flag & (T_PROP_EDIT|T_PROP_CONNECTED)) + sprintf(str, "%s Proportional size: %.2f", str, t->prop_size); } static void applyTranslation(TransInfo *t, float vec[3]) { |