Commit: d7c46c5d16c24e431c504148706ee3b5c68a2fd7
Author: Andrew Buttery
Date:   Thu Jan 16 16:47:12 2014 +1100
https://developer.blender.org/rBd7c46c5d16c24e431c504148706ee3b5c68a2fd7

User Prefs: Manipulator unit and tooltip fixes

removal of x5 hardcoded size multiplier

===================================================================

M       source/blender/blenkernel/BKE_blender.h
M       source/blender/editors/interface/resources.c
M       source/blender/editors/transform/transform_manipulator.c
M       source/blender/makesrna/intern/rna_userdef.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_blender.h 
b/source/blender/blenkernel/BKE_blender.h
index e2f86c2..99595b3 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -42,7 +42,7 @@ extern "C" {
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #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 */
 #define BLENDER_MINVERSION      262
 #define BLENDER_MINSUBVERSION   0
diff --git a/source/blender/editors/interface/resources.c 
b/source/blender/editors/interface/resources.c
index f19a10a..d416600 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1468,7 +1468,7 @@ void init_userdef_do_versions(void)
        /* transform widget settings */
        if (U.tw_hotspot == 0) {
                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 */
        }
        if (U.pad_rot_angle == 0)
@@ -2337,7 +2337,11 @@ void init_userdef_do_versions(void)
                        rgba_char_args_test_set(btheme->tinfo.info_debug_text, 
0, 0, 0, 255);
                }
        }
-       
+
+       if (!MAIN_VERSION_ATLEAST(bmain, 269, 9)) {
+               U.tw_size = U.tw_size * 5.0f;
+       }
+
        if (U.versionfile < 270) {
                /* grease pencil - new layer color */
                if (U.gpencil_new_layer_col[3] < 0.1f) {
diff --git a/source/blender/editors/transform/transform_manipulator.c 
b/source/blender/editors/transform/transform_manipulator.c
index 5ac97ed..a2edb2d 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -1640,7 +1640,7 @@ void BIF_draw_manipulator(const bContext *C)
                                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
diff --git a/source/blender/makesrna/intern/rna_userdef.c 
b/source/blender/makesrna/intern/rna_userdef.c
index 64a0c7d..f4cb470 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -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_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_range(prop, 2, 40);
-       RNA_def_property_int_default(prop, 15);
-       RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, 
in 10 pixel units");
+       RNA_def_property_range(prop, 10, 200);
+       RNA_def_property_int_default(prop, 75);
+       RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of the 
manipulator");
        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_range(prop, 2, 40);
        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");
 
        prop = RNA_def_property(srna, "manipulator_hotspot", PROP_INT, 
PROP_PIXEL);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to