[Bf-blender-cvs] [46abc6ce25a] master: Fix T95238: BPY Documentation for Tablet Pressure is Incorrect
Germano Cavalcante
noreply at git.blender.org
Mon Jan 31 14:20:56 CET 2022
Commit: 46abc6ce25a7aee35f3d9a89c839d898d40694ab
Author: Germano Cavalcante
Date: Mon Jan 31 10:19:46 2022 -0300
Branches: master
https://developer.blender.org/rB46abc6ce25a7aee35f3d9a89c839d898d40694ab
Fix T95238: BPY Documentation for Tablet Pressure is Incorrect
Set an appropriate range and default value for the property.
===================================================================
M source/blender/makesrna/intern/rna_wm.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index c64a47fc2ab..178a50c4d29 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -2175,7 +2175,8 @@ static void rna_def_event(BlenderRNA *brna)
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);
+ prop = RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 1.0f);
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(
More information about the Bf-blender-cvs
mailing list