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.
This commit is contained in:
2011-01-08 16:54:38 +00:00
parent 17dd29cb85
commit 6594b591de
2 changed files with 18 additions and 0 deletions

View File

@@ -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]) {