diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-01-10 04:25:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-01-10 04:41:45 +0300 |
commit | fdd3d969a621132ec0f3aeae8875b146f8e3a19d (patch) | |
tree | baf9a648846089bc6aadda12067487cf199a0884 /source/blender/makesrna/intern/rna_wm.c | |
parent | 9aada45e52e88d272c38dc2e47cbc9a6d3d35698 (diff) |
Fix T53491: Absolute tablet motion detection fails
When using a tablet, detecting absolute motion only worked
when activating a tool with the tablet.
Pressing Enter to run a tool for e.g. would use relative motion.
Now store is_motion_absolute in the event,
set for new events based on the most recent motion events.
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 23ad51be343..3ca46fea7b6 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1766,6 +1766,11 @@ static void rna_def_event(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, "rna_Event_is_tablet_get", NULL); RNA_def_property_ui_text(prop, "Tablet Pressure", "The pressure of the tablet or 1.0 if no tablet present"); + prop = RNA_def_property(srna, "is_mouse_absolute", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "is_motion_absolute", 1); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Absolute Motion", "The last motion event was an absolute an input"); + /* modifiers */ prop = RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shift", 1); |