diff options
author | recht Van Lommel <brecht@blender.org> | 2022-09-26 23:56:14 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-09-26 23:59:35 +0300 |
commit | 84ddb8b3cc9989c2d5569bf2fa381a585f99d20f (patch) | |
tree | e41c117b0551d888abead3d09bacaabaab66379c /source/blender/makesrna | |
parent | 57ea827bfb28eb697b74dbc606facbc133e10fab (diff) |
UI: add preference to disable touchpad multitouch gestures
Available on Windows and macOS, where such gestures are supported.
For Windows, disabling this option restores touchpad behavior to
match Blender 3.2.
Ref T97925
Differential Revision: https://developer.blender.org/D16005
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index b2f37ee2ae1..c9e3822c996 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -403,11 +403,11 @@ static void rna_userdef_anim_update(Main *UNUSED(bmain), USERDEF_TAG_DIRTY; } -static void rna_userdef_tablet_api_update(Main *UNUSED(bmain), - Scene *UNUSED(scene), - PointerRNA *UNUSED(ptr)) +static void rna_userdef_input_devices(Main *UNUSED(bmain), + Scene *UNUSED(scene), + PointerRNA *UNUSED(ptr)) { - WM_init_tablet_api(); + WM_init_input_devices(); USERDEF_TAG_DIRTY; } @@ -5738,6 +5738,14 @@ static void rna_def_userdef_input(BlenderRNA *brna) RNA_def_property_enum_items(prop, view_zoom_axes); RNA_def_property_ui_text(prop, "Zoom Axis", "Axis of mouse movement to zoom in or out on"); + prop = RNA_def_property(srna, "use_multitouch_gestures", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_NO_MULTITOUCH_GESTURES); + RNA_def_property_ui_text( + prop, + "Multitouch Gestures", + "Use multitouch gestures for navigation with touchpad, instead of scroll wheel emulation"); + RNA_def_property_update(prop, 0, "rna_userdef_input_devices"); + prop = RNA_def_property(srna, "invert_mouse_zoom", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_INVERT); RNA_def_property_ui_text( @@ -5873,7 +5881,7 @@ static void rna_def_userdef_input(BlenderRNA *brna) "Tablet API", "Select the tablet API to use for pressure sensitivity (may require " "restarting Blender for changes to take effect)"); - RNA_def_property_update(prop, 0, "rna_userdef_tablet_api_update"); + RNA_def_property_update(prop, 0, "rna_userdef_input_devices"); # ifdef WITH_INPUT_NDOF /* 3D mouse settings */ |