diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-08-03 18:22:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-08-03 18:31:25 +0300 |
commit | e82b7f15270eb4e4dbcd119ea09d1f0204f1dc11 (patch) | |
tree | a3250de9f9d1ffa7a71737c19fcf80ac18b445ff /source/blender/makesrna/intern/rna_userdef.c | |
parent | 27aef8b551bd30817bac13cfe77d5a142ac0d037 (diff) |
3D View: preferences for rotate sensitivity
Added because the current default is too fast
for painting with tablets, see D5385.
Turntable and trackball have different settings because
turn-table uses an angle-per-pixel, where as trackball
values are relative to the view-port size so a scale is used.
The sensitivity is scaled by the pixel size so hi-dpi views don't rotate faster.
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 7b7d9e71cd2..e649a95fb06 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -30,6 +30,7 @@ #include "BLI_utildefines.h" #include "BLI_math_base.h" +#include "BLI_math_rotation.h" #include "BLT_translation.h" @@ -5230,6 +5231,20 @@ static void rna_def_userdef_input(BlenderRNA *brna) RNA_def_property_struct_type(prop, "WalkNavigation"); RNA_def_property_ui_text(prop, "Walk Navigation", "Settings for walk navigation mode"); + prop = RNA_def_property(srna, "view_rotate_sensitivity_turntable", PROP_FLOAT, PROP_ANGLE); + RNA_def_property_range(prop, DEG2RADF(0.001f), DEG2RADF(15.0f)); + RNA_def_property_float_default(prop, DEG2RADF(0.4f)); + RNA_def_property_ui_range(prop, DEG2RADF(0.001f), DEG2RADF(15.0f), 1.0f, 2); + RNA_def_property_ui_text(prop, + "Rotate Sensitivity", + "Rotation amount per-pixel to control how fast the viewport rotates"); + + prop = RNA_def_property(srna, "view_rotate_sensitivity_trackball", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_range(prop, 0.1f, 10.0f); + RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_ui_range(prop, 0.1f, 2.0f, 0.01f, 2); + RNA_def_property_ui_text(prop, "Rotate Sensitivity", "Scale trackball rotation sensitivity"); + /* tweak tablet & mouse preset */ prop = RNA_def_property(srna, "drag_threshold_mouse", PROP_INT, PROP_PIXEL); RNA_def_property_range(prop, 1, 255); |