Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-12-01 02:58:09 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-12-01 03:09:38 +0300
commitb29ee36f6ad1246d8c48aadc0992d76a2c598a0e (patch)
treedc1ebc60e672e9aa6e739224e6b8b6e0be926aa8 /source/blender/makesrna/intern/rna_define.c
parent09fdacdb397b26cd7cde869e8f31d4f4f147f25a (diff)
Fix T46900: Inset Faces Thickness & Depth Do Not Use Scene Units (i.e. Imperial).
Was the case of several Mesh operators actually (and probably others, but cannot check everything). Added `RNA_def_property_float_distance` helper, avoids having to set PROP_DISTANCE subtype explicitly each time...
Diffstat (limited to 'source/blender/makesrna/intern/rna_define.c')
-rw-r--r--source/blender/makesrna/intern/rna_define.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index d2b8f501576..f4b2c15b304 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -2875,6 +2875,18 @@ PropertyRNA *RNA_def_float_rotation(StructOrFunctionRNA *cont_, const char *iden
return prop;
}
+PropertyRNA *RNA_def_float_distance(StructOrFunctionRNA *cont_, const char *identifier,
+ float default_value, float hardmin, float hardmax, const char *ui_name,
+ const char *ui_description, float softmin, float softmax)
+{
+ PropertyRNA *prop = RNA_def_float(cont_, identifier, default_value,
+ hardmin, hardmax, ui_name, ui_description,
+ softmin, softmax);
+ RNA_def_property_subtype(prop, PROP_DISTANCE);
+
+ return prop;
+}
+
PropertyRNA *RNA_def_float_array(StructOrFunctionRNA *cont_, const char *identifier, int len,
const float *default_value, float hardmin, float hardmax, const char *ui_name,
const char *ui_description, float softmin, float softmax)