diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 23b6d1e41ae..21df596dec2 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -565,6 +565,12 @@ static int rna_Event_unicode_length(PointerRNA *ptr) } } +static float rna_Event_pressure_get(PointerRNA *ptr) +{ + wmEvent *event = ptr->data; + return WM_event_tablet_data(event, NULL); +} + static PointerRNA rna_PopupMenu_layout_get(PointerRNA *ptr) { struct uiPopupMenu *pup = ptr->data; @@ -1608,6 +1614,10 @@ static void rna_def_event(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Mouse Previous Y Position", "The window relative vertical location of the mouse"); + prop = RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_float_funcs(prop, "rna_Event_pressure_get", NULL, NULL); + RNA_def_property_ui_text(prop, "Tablet Pressure", "The pressure of the tablet or 1.0 if no tablet present"); /* modifiers */ prop = RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE); |