Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-05-30 07:47:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-30 08:03:19 +0300
commit0c8c1602029b5a0a34b7750c03b03fe990104c0e (patch)
tree5e807f8f58549936ca5cd072e0a16f4fd8092646 /source/blender/makesrna/intern
parent82e8e5c871f86e65f332cdde3bd484a55e7e8572 (diff)
WM: use different drag thresholds for mouse/tablet events
Now a small threshold is used for mouse input, avoiding delay when gizmos are activated on drag. Tablet input threshold remains unchanged since it's easier to make small movements when using a tablet. A larger threshold for non-cursor input is now used (typically keyboard) which improves usability when the "Pie Menu on Drag" key-map preference.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c38
1 files changed, 26 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index d06e938b262..f505e4d9e09 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -5201,23 +5201,37 @@ static void rna_def_userdef_input(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Walk Navigation", "Settings for walk navigation mode");
/* tweak tablet & mouse preset */
+ prop = RNA_def_property(srna, "drag_threshold_mouse", PROP_INT, PROP_PIXEL);
+ RNA_def_property_range(prop, 3, 255);
+ RNA_def_property_ui_text(prop,
+ "Mouse Drag Threshold",
+ "Number of pixels to drag before a tweak/drag event is triggered "
+ "for mouse/track-pad input "
+ "(otherwise click events are detected)");
+
+ prop = RNA_def_property(srna, "drag_threshold_tablet", PROP_INT, PROP_PIXEL);
+ RNA_def_property_range(prop, 3, 255);
+ RNA_def_property_ui_text(prop,
+ "Tablet Drag Threshold",
+ "Number of pixels to drag before a tweak/drag event is triggered "
+ "for tablet input "
+ "(otherwise click events are detected)");
+
prop = RNA_def_property(srna, "drag_threshold", PROP_INT, PROP_PIXEL);
- RNA_def_property_int_sdna(prop, NULL, "tweak_threshold");
- RNA_def_property_range(prop, 3, 1024);
- RNA_def_property_ui_text(
- prop,
- "Drag Threshold",
- "Number of pixels you have to drag before a tweak/drag event is triggered "
- "(otherwise click events are detected)");
+ RNA_def_property_range(prop, 3, 255);
+ RNA_def_property_ui_text(prop,
+ "Drag Threshold",
+ "Number of pixels to drag before a drag event is triggered "
+ "for keyboard and other non mouse/tablet input "
+ "(otherwise click events are detected)");
prop = RNA_def_property(srna, "move_threshold", PROP_INT, PROP_PIXEL);
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_range(prop, 0, 10, 1, -1);
- RNA_def_property_ui_text(
- prop,
- "Motion Threshold",
- "Number of pixels you have to before the cursor is considered to have moved "
- "(used for cycling selected items on successive clicks)");
+ RNA_def_property_ui_text(prop,
+ "Motion Threshold",
+ "Number of pixels to before the cursor is considered to have moved "
+ "(used for cycling selected items on successive clicks)");
/* tablet pressure curve */
prop = RNA_def_property(srna, "pressure_threshold_max", PROP_FLOAT, PROP_FACTOR);