[Bf-blender-cvs] [2374cb3] master: BMesh: subdiv smooth, use simpler even calculation

Campbell Barton noreply at git.blender.org
Sun Apr 26 11:21:44 CEST 2015


Commit: 2374cb380b83ce97db5545eb0c4f3ccd51e87d9c
Author: Campbell Barton
Date:   Sun Apr 26 19:19:05 2015 +1000
Branches: master
https://developer.blender.org/rB2374cb380b83ce97db5545eb0c4f3ccd51e87d9c

BMesh: subdiv smooth, use simpler even calculation

Was checking all vertices adjacent faces,
now just compare the difference between normal angles.

Also default to inverse-square for loopcut-subdiv falloff.

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

M	source/blender/bmesh/operators/bmo_subdivide.c
M	source/blender/editors/mesh/editmesh_loopcut.c

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

diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c
index 6a7b0dd..306cdae 100644
--- a/source/blender/bmesh/operators/bmo_subdivide.c
+++ b/source/blender/bmesh/operators/bmo_subdivide.c
@@ -198,7 +198,7 @@ static void alter_co(
 		val = bmesh_subd_falloff_calc(params->smooth_falloff, val);
 
 		if (params->use_smooth_even) {
-			val *= BM_vert_calc_shell_factor(v);
+			val *= shell_v3v3_mid_normalized_to_dist(v_a->no, v_b->no);
 		}
 
 		mul_v3_fl(tvec, params->smooth * val * len);
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 3d93210..a4ea2ab 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -835,7 +835,7 @@ void MESH_OT_loopcut(wmOperatorType *ot)
 
 	prop = RNA_def_property(ot->srna, "falloff", PROP_ENUM, PROP_NONE);
 	RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items);
-	RNA_def_property_enum_default(prop, PROP_ROOT);
+	RNA_def_property_enum_default(prop, PROP_INVSQUARE);
 	RNA_def_property_ui_text(prop, "Falloff", "Falloff type the feather");
 	RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */




More information about the Bf-blender-cvs mailing list