[Bf-blender-cvs] [881675dff13] master: Clarify in FloatProperty generated docs: single precision floats.
Howard Trickey
noreply at git.blender.org
Wed Jul 31 20:04:11 CEST 2019
Commit: 881675dff13d3ff971e4b341eec4ecfca3f74d97
Author: Howard Trickey
Date: Wed Jul 31 13:58:09 2019 -0400
Branches: master
https://developer.blender.org/rB881675dff13d3ff971e4b341eec4ecfca3f74d97
Clarify in FloatProperty generated docs: single precision floats.
At least one script writer was upset that this was not specified,
as it is different from "floating point" in Python.
Also, docstring for hard and soft min and max for FloatProperty
was wrong, using sys.float_info.min and sys.float_info.max.
===================================================================
M source/blender/makesrna/intern/rna_rna.c
M source/blender/python/intern/bpy_props.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 9834520f952..3ca4792f9b4 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -3077,7 +3077,7 @@ void RNA_def_rna(BlenderRNA *brna)
/* FloatProperty */
srna = RNA_def_struct(brna, "FloatProperty", "Property");
RNA_def_struct_ui_text(
- srna, "Float Definition", "RNA floating pointer number property definition");
+ srna, "Float Definition", "RNA floating point number (single precision) property definition");
rna_def_number_property(srna, PROP_FLOAT);
/* StringProperty */
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index ad7d5137ebc..b49417872db 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -2566,8 +2566,8 @@ PyDoc_STRVAR(BPy_FloatProperty_doc,
".. function:: FloatProperty(name=\"\", "
"description=\"\", "
"default=0.0, "
- "min=sys.float_info.min, max=sys.float_info.max, "
- "soft_min=sys.float_info.min, soft_max=sys.float_info.max, "
+ "min=-3.402823e+38, max=3.402823e+38, "
+ "soft_min=-3.402823e+38, soft_max=3.402823e+38, "
"step=3, "
"precision=2, "
"options={'ANIMATABLE'}, "
@@ -2578,7 +2578,7 @@ PyDoc_STRVAR(BPy_FloatProperty_doc,
"get=None, "
"set=None)\n"
"\n"
- " Returns a new float property definition.\n"
+ " Returns a new float (single precision) property definition.\n"
"\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_NUM_MIN_DOC
" :type min: float\n" BPY_PROPDEF_NUM_MAX_DOC
" :type max: float\n" BPY_PROPDEF_NUM_SOFTMIN_DOC
More information about the Bf-blender-cvs
mailing list