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]) { diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 23c045ba4f9..13a46e08814 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1087,6 +1087,11 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode"); RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */ + prop= RNA_def_property(srna, "proportional_size", PROP_FLOAT, PROP_DISTANCE); + RNA_def_property_float_sdna(prop, NULL, "proportional_size"); + RNA_def_property_ui_text(prop, "Proportional Size", "Display size for proportional editing circle"); + RNA_def_property_range(prop, 0.00001, 5000.0); + prop= RNA_def_property(srna, "normal_size", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "normalsize"); RNA_def_property_ui_text(prop, "Normal Size", "Display size for normals in the 3D view");