User Prefs: Manipulator unit and tooltip fixes

removal of x5 hardcoded size multiplier
This commit is contained in:
2014-01-16 16:47:12 +11:00
committed by Campbell Barton
parent 95acd3b20a
commit d7c46c5d16
4 changed files with 14 additions and 10 deletions

View File

@@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines. * and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */ * Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 269 #define BLENDER_VERSION 269
#define BLENDER_SUBVERSION 8 #define BLENDER_SUBVERSION 9
/* 262 was the last editmesh release but it has compatibility code for bmesh data */ /* 262 was the last editmesh release but it has compatibility code for bmesh data */
#define BLENDER_MINVERSION 262 #define BLENDER_MINVERSION 262
#define BLENDER_MINSUBVERSION 0 #define BLENDER_MINSUBVERSION 0

View File

@@ -1468,7 +1468,7 @@ void init_userdef_do_versions(void)
/* transform widget settings */ /* transform widget settings */
if (U.tw_hotspot == 0) { if (U.tw_hotspot == 0) {
U.tw_hotspot = 14; U.tw_hotspot = 14;
U.tw_size = 20; /* percentage of window size */ U.tw_size = 25; /* percentage of window size */
U.tw_handlesize = 16; /* percentage of widget radius */ U.tw_handlesize = 16; /* percentage of widget radius */
} }
if (U.pad_rot_angle == 0) if (U.pad_rot_angle == 0)
@@ -2338,6 +2338,10 @@ void init_userdef_do_versions(void)
} }
} }
if (!MAIN_VERSION_ATLEAST(bmain, 269, 9)) {
U.tw_size = U.tw_size * 5.0f;
}
if (U.versionfile < 270) { if (U.versionfile < 270) {
/* grease pencil - new layer color */ /* grease pencil - new layer color */
if (U.gpencil_new_layer_col[3] < 0.1f) { if (U.gpencil_new_layer_col[3] < 0.1f) {

View File

@@ -1640,7 +1640,7 @@ void BIF_draw_manipulator(const bContext *C)
break; break;
} }
mul_mat3_m4_fl(rv3d->twmat, ED_view3d_pixel_size(rv3d, rv3d->twmat[3]) * U.tw_size * 5.0f); mul_mat3_m4_fl(rv3d->twmat, ED_view3d_pixel_size(rv3d, rv3d->twmat[3]) * U.tw_size);
} }
/* when looking through a selected camera, the manipulator can be at the /* when looking through a selected camera, the manipulator can be at the

View File

@@ -3229,18 +3229,18 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Manipulator", "Use 3D transform manipulator"); RNA_def_property_ui_text(prop, "Manipulator", "Use 3D transform manipulator");
RNA_def_property_update(prop, 0, "rna_userdef_show_manipulator_update"); RNA_def_property_update(prop, 0, "rna_userdef_show_manipulator_update");
prop = RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE); prop = RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "tw_size"); RNA_def_property_int_sdna(prop, NULL, "tw_size");
RNA_def_property_range(prop, 2, 40); RNA_def_property_range(prop, 10, 200);
RNA_def_property_int_default(prop, 15); RNA_def_property_int_default(prop, 75);
RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, in 10 pixel units"); RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of the manipulator");
RNA_def_property_update(prop, 0, "rna_userdef_update"); RNA_def_property_update(prop, 0, "rna_userdef_update");
prop = RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE); prop = RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "tw_handlesize"); RNA_def_property_int_sdna(prop, NULL, "tw_handlesize");
RNA_def_property_range(prop, 2, 40); RNA_def_property_range(prop, 2, 40);
RNA_def_property_int_default(prop, 25); RNA_def_property_int_default(prop, 25);
RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius"); RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of manipulator handles as percentage of the radius");
RNA_def_property_update(prop, 0, "rna_userdef_update"); RNA_def_property_update(prop, 0, "rna_userdef_update");
prop = RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_PIXEL); prop = RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_PIXEL);