Fix T60226: Inset not working well on very small faces

The inset operator uses 0.01 as default for the inset.
When the face is very small than this default is very confusing (see T60226).

The simplest fix seems to be to just use 0 as default.
This is similar to the extrude operator which uses 0 as default as well.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4273
This commit is contained in:
Jacques Lucke
2019-01-29 13:39:21 +01:00
parent 79f76c8544
commit 3b6e4cf7ce

View File

@@ -124,7 +124,7 @@ static bool edbm_inset_init(bContext *C, wmOperator *op, const bool is_modal)
ViewLayer *view_layer = CTX_data_view_layer(C);
if (is_modal) {
RNA_float_set(op->ptr, "thickness", 0.01f);
RNA_float_set(op->ptr, "thickness", 0.0f);
RNA_float_set(op->ptr, "depth", 0.0f);
}
@@ -148,7 +148,7 @@ static bool edbm_inset_init(bContext *C, wmOperator *op, const bool is_modal)
opdata->ob_store_len = objects_used_len;
}
opdata->old_thickness = 0.01;
opdata->old_thickness = 0.0;
opdata->old_depth = 0.0;
opdata->modify_depth = false;
opdata->shift = false;
@@ -566,7 +566,7 @@ void MESH_OT_inset(wmOperatorType *ot)
ot->srna, "use_edge_rail",
false, "Edge Rail", "Inset the region along existing edges");
prop = RNA_def_float_distance(ot->srna, "thickness", 0.01f, 0.0f, 1e12f, "Thickness", "", 0.0f, 10.0f);
prop = RNA_def_float_distance(ot->srna, "thickness", 0.0f, 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);