diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-19 23:03:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-19 23:03:15 +0400 |
commit | e387ccdb427030927bb2cf9552c3ce6eb6ffa6b7 (patch) | |
tree | dfacf75746f50a381fd41e67fa65bfe97d6ac687 /source/blender/editors/mesh | |
parent | c7f8af329bb6c8cf7eeaa480269d75f86de9b896 (diff) |
bmesh inset: add depth option (make use of relative and even offset options)
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 2d27b64d3af..26c50fb4feb 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -4200,13 +4200,16 @@ static int edbm_inset_exec(bContext *C, wmOperator *op) const int use_boundary = RNA_boolean_get(op->ptr, "use_boundary"); const int use_even_offset = RNA_boolean_get(op->ptr, "use_even_offset"); const int use_relative_offset = RNA_boolean_get(op->ptr, "use_relative_offset"); - const float thickness = RNA_float_get(op->ptr, "thickness"); + const float thickness = RNA_float_get(op->ptr, "thickness"); + const float depth = RNA_float_get(op->ptr, "depth"); const int use_outset = RNA_boolean_get(op->ptr, "use_outset"); const int use_select_inset = RNA_boolean_get(op->ptr, "use_select_inset"); /* not passed onto the BMO */ EDBM_op_init(em, &bmop, op, - "inset faces=%hf use_boundary=%b use_even_offset=%b use_relative_offset=%b thickness=%f use_outset=%b", - BM_ELEM_SELECT, use_boundary, use_even_offset, use_relative_offset, thickness, use_outset); + "inset faces=%hf use_boundary=%b use_even_offset=%b use_relative_offset=%b " + "thickness=%f depth=%f use_outset=%b", + BM_ELEM_SELECT, use_boundary, use_even_offset, use_relative_offset, + thickness, depth, use_outset); BMO_op_exec(em->bm, &bmop); @@ -4252,9 +4255,11 @@ void MESH_OT_inset(wmOperatorType *ot) RNA_def_boolean(ot->srna, "use_even_offset", TRUE, "Offset Even", "Scale the offset to give more even thickness"); RNA_def_boolean(ot->srna, "use_relative_offset", FALSE, "Offset Relative", "Scale the offset by surrounding geometry"); - prop = RNA_def_float(ot->srna, "thickness", 0.01f, 0.0f, FLT_MAX, "thickness", "", 0.0f, 10.0f); + prop = RNA_def_float(ot->srna, "thickness", 0.01f, 0.0f, FLT_MAX, "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, -FLT_MAX, FLT_MAX, "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"); RNA_def_boolean(ot->srna, "use_select_inset", TRUE, "Select Outer", "Select the new inset faces"); |