From b29ee36f6ad1246d8c48aadc0992d76a2c598a0e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 1 Dec 2015 00:58:09 +0100 Subject: 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... --- source/blender/editors/mesh/editmesh_inset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_inset.c') diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c index c037b0c6b0f..14a477ee86c 100644 --- a/source/blender/editors/mesh/editmesh_inset.c +++ b/source/blender/editors/mesh/editmesh_inset.c @@ -507,10 +507,10 @@ void MESH_OT_inset(wmOperatorType *ot) RNA_def_boolean(ot->srna, "use_relative_offset", false, "Offset Relative", "Scale the offset by surrounding geometry"); RNA_def_boolean(ot->srna, "use_edge_rail", false, "Edge Rail", "Inset the region along existing edges"); - prop = RNA_def_float(ot->srna, "thickness", 0.01f, 0.0f, 1e12f, "Thickness", "", 0.0f, 10.0f); + prop = RNA_def_float_distance(ot->srna, "thickness", 0.01f, 0.0f, 1e12f, "Thickness", "", 0.0f, 10.0f); /* use 1 rather then 10 for max else dragging the button moves too far */ RNA_def_property_ui_range(prop, 0.0, 1.0, 0.01, 4); - prop = RNA_def_float(ot->srna, "depth", 0.0f, -1e12f, 1e12f, "Depth", "", -10.0f, 10.0f); + prop = RNA_def_float_distance(ot->srna, "depth", 0.0f, -1e12f, 1e12f, "Depth", "", -10.0f, 10.0f); RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.01, 4); RNA_def_boolean(ot->srna, "use_outset", false, "Outset", "Outset rather than inset"); -- cgit v1.2.3