[Bf-blender-cvs] [15c301f] master: Change default for bevel to match previous behavior.

Howard Trickey noreply at git.blender.org
Sun Jul 5 19:33:44 CEST 2015


Commit: 15c301f533ffbda2f6ea85dbdcafec5a3431bdc4
Author: Howard Trickey
Date:   Sun Jul 5 13:31:26 2015 -0400
Branches: master
https://developer.blender.org/rB15c301f533ffbda2f6ea85dbdcafec5a3431bdc4

Change default for bevel to match previous behavior.

Have reconsidered and feel it best to try matching previous behavior
(doing "loop slides" where possible) as default. This will avoid the
need to change regression tests, among other things.

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

M	source/blender/editors/mesh/editmesh_bevel.c
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesrna/intern/rna_modifier.c
M	source/blender/modifiers/intern/MOD_bevel.c

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

diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 7099776..dda21b3 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -502,6 +502,6 @@ void MESH_OT_bevel(wmOperatorType *ot)
 	RNA_def_boolean(ot->srna, "vertex_only", false, "Vertex Only", "Bevel only vertices");
 	RNA_def_boolean(ot->srna, "clamp_overlap", false, "Clamp Overlap",
 	                "Do not allow beveled edges/vertices to overlap each other");
-	RNA_def_boolean(ot->srna, "loop_slide", false, "Loop Slide", "Prefer slide along edge to even widths");
+	RNA_def_boolean(ot->srna, "loop_slide", true, "Loop Slide", "Prefer slide along edge to even widths");
 	RNA_def_int(ot->srna, "material", -1, -1, INT_MAX, "Material", "Material for bevel faces (-1 means use adjacent faces)", -1, 100);
 }
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 8319dc3..322df66 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -338,7 +338,7 @@ enum {
 /*	MOD_BEVEL_EVEN          = (1 << 11), */
 /*	MOD_BEVEL_DIST          = (1 << 12), */  /* same as above */
 	MOD_BEVEL_OVERLAP_OK    = (1 << 13),
-	MOD_BEVEL_LOOP_SLIDE    = (1 << 14),
+	MOD_BEVEL_EVEN_WIDTHS   = (1 << 14),
 };
 
 /* BevelModifierData->val_flags (not used as flags any more) */
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 7bbf975..affaef3 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -2826,7 +2826,7 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
 	RNA_def_property_update(prop, 0, "rna_Modifier_update");
 
 	prop = RNA_def_property(srna, "loop_slide", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_BEVEL_LOOP_SLIDE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "flags", MOD_BEVEL_EVEN_WIDTHS);
 	RNA_def_property_ui_text(prop, "Loop Slide", "Prefer sliding along edges to having even widths");
 	RNA_def_property_update(prop, 0, "rna_Modifier_update");
 }
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c
index 63e4b15..5874029 100644
--- a/source/blender/modifiers/intern/MOD_bevel.c
+++ b/source/blender/modifiers/intern/MOD_bevel.c
@@ -112,7 +112,7 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *ob,
 	const bool do_clamp = !(bmd->flags & MOD_BEVEL_OVERLAP_OK);
 	const int offset_type = bmd->val_flags;
 	const int mat = CLAMPIS(bmd->mat, -1, ob->totcol - 1);
-	const bool loop_slide = (bmd->flags & MOD_BEVEL_LOOP_SLIDE) != 0;
+	const bool loop_slide = (bmd->flags & MOD_BEVEL_EVEN_WIDTHS) == 0;
 
 	bm = DM_to_bmesh(dm, true);
 	if ((bmd->lim_flags & MOD_BEVEL_VGROUP) && bmd->defgrp_name[0])




More information about the Bf-blender-cvs mailing list