[Bf-blender-cvs] [3b6e4cf7cec] master: Fix T60226: Inset not working well on very small faces

Jacques Lucke noreply at git.blender.org
Tue Jan 29 13:40:05 CET 2019


Commit: 3b6e4cf7cec8845cf839f10d241c1dcc81eb98b2
Author: Jacques Lucke
Date:   Tue Jan 29 13:39:21 2019 +0100
Branches: master
https://developer.blender.org/rB3b6e4cf7cec8845cf839f10d241c1dcc81eb98b2

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

===================================================================

M	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 4ec46ff9d2b..69f12c4e34f 100644
--- a/source/blender/editors/mesh/editmesh_inset.c
+++ b/source/blender/editors/mesh/editmesh_inset.c
@@ -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);



More information about the Bf-blender-cvs mailing list