[Bf-blender-cvs] [f76c15efb70] master: Bevel mod: cleanup flags and extra data.

Howard Trickey noreply at git.blender.org
Tue Feb 26 13:37:35 CET 2019


Commit: f76c15efb70207cf4e92708e0565110bbae854ab
Author: Howard Trickey
Date:   Tue Feb 26 07:33:41 2019 -0500
Branches: master
https://developer.blender.org/rBf76c15efb70207cf4e92708e0565110bbae854ab

Bevel mod: cleanup flags and extra data.

Removed a clnors field unneeded after a recent refactor.
Finished deprecation of flags that haven't been used since pre-bmesh.

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

M	source/blender/blenloader/intern/readfile.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/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 6f62b260444..df653359fad 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5778,10 +5778,6 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
 				}
 			}
 		}
-		else if (md->type == eModifierType_Bevel) {
-			BevelModifierData *bmd = (BevelModifierData *)md;
-			bmd->clnordata.faceHash = NULL;
-		}
 		else if (md->type == eModifierType_Multires) {
 			MultiresModifierData *mmd = (MultiresModifierData *)md;
 			mmd->subdiv = NULL;
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index f5531c74ad1..f3ef9683607 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -357,10 +357,6 @@ enum {
 	MOD_EDGESPLIT_FROMFLAG   = (1 << 2),
 };
 
-typedef struct BevelModNorEditData {
-	struct GHash *faceHash;
-} BevelModNorEditData;
-
 typedef struct BevelModifierData {
 	ModifierData modifier;
 
@@ -393,25 +389,21 @@ typedef struct BevelModifierData {
 	/** if the MOD_BEVEL_VWEIGHT option is set,
 	 * this will be the name of the vert group, MAX_VGROUP_NAME */
 	char defgrp_name[64];
-	struct BevelModNorEditData clnordata;
 } BevelModifierData;
 
 /* BevelModifierData->flags and BevelModifierData->lim_flags */
 enum {
 	MOD_BEVEL_VERT          = (1 << 1),
-/*	MOD_BEVEL_RADIUS        = (1 << 2), */
+/*	unused                  = (1 << 2), */
 	MOD_BEVEL_ANGLE         = (1 << 3),
 	MOD_BEVEL_WEIGHT        = (1 << 4),
 	MOD_BEVEL_VGROUP        = (1 << 5),
-	MOD_BEVEL_EMIN          = (1 << 7),
-	MOD_BEVEL_EMAX          = (1 << 8),
-/*	MOD_BEVEL_RUNNING       = (1 << 9), */
-/*	MOD_BEVEL_RES           = (1 << 10), */
-	/* This is a new setting not related to old (trunk bmesh bevel code)
-	 * but adding here because they are mixed - campbell
-	 */
-/*	MOD_BEVEL_EVEN          = (1 << 11), */
-/*	MOD_BEVEL_DIST          = (1 << 12), */  /* same as above */
+/*	unused                  = (1 << 7), */
+/*	unused                  = (1 << 8), */
+/*	unused                  = (1 << 9), */
+/*	unused                  = (1 << 10), */
+/*	unused                  = (1 << 11), */
+/*	unused                  = (1 << 12), */
 	MOD_BEVEL_OVERLAP_OK    = (1 << 13),
 	MOD_BEVEL_EVEN_WIDTHS   = (1 << 14),
 	MOD_BEVEL_HARDEN_NORMALS = (1 << 15),
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 121733671f7..ae22fbd5e54 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -3035,14 +3035,6 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
 		{0, NULL, 0, NULL, NULL},
 	};
 
-	/* TO BE DEPRECATED */
-	static const EnumPropertyItem prop_edge_weight_method_items[] = {
-		{0, "AVERAGE", 0, "Average", ""},
-		{MOD_BEVEL_EMIN, "SHARPEST", 0, "Sharpest", ""},
-		{MOD_BEVEL_EMAX, "LARGEST", 0, "Largest", ""},
-		{0, NULL, 0, NULL, NULL},
-	};
-
 	static EnumPropertyItem prop_harden_normals_items[] = {
 		{ MOD_BEVEL_FACE_STRENGTH_NONE, "FSTR_NONE", 0, "None", "Do not set face strength" },
 		{ MOD_BEVEL_FACE_STRENGTH_NEW, "FSTR_NEW", 0, "New", "Set face strength on new faces only" },
@@ -3095,13 +3087,6 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Limit Method", "");
 	RNA_def_property_update(prop, 0, "rna_Modifier_update");
 
-	/* TO BE DEPRECATED */
-	prop = RNA_def_property(srna, "edge_weight_method", PROP_ENUM, PROP_NONE);
-	RNA_def_property_enum_sdna(prop, NULL, "e_flags");
-	RNA_def_property_enum_items(prop, prop_edge_weight_method_items);
-	RNA_def_property_ui_text(prop, "Edge Weight Method", "What edge weight to use for weighting a vertex");
-	RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
 	prop = RNA_def_property(srna, "angle_limit", PROP_FLOAT, PROP_ANGLE);
 	RNA_def_property_float_sdna(prop, NULL, "bevel_angle");
 	RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c
index 7bd877f6dee..0b28f51a338 100644
--- a/source/blender/modifiers/intern/MOD_bevel.c
+++ b/source/blender/modifiers/intern/MOD_bevel.c
@@ -62,16 +62,11 @@ static void initData(ModifierData *md)
 	bmd->profile = 0.5f;
 	bmd->bevel_angle = DEG2RADF(30.0f);
 	bmd->defgrp_name[0] = '\0';
-	bmd->clnordata.faceHash = NULL;
 }
 
 static void copyData(const ModifierData *md_src, ModifierData *md_dst, const int flag)
 {
-	BevelModifierData *bmd_dst = (BevelModifierData *)md_dst;
-
 	modifier_copyData_generic(md_src, md_dst, flag);
-
-	bmd_dst->clnordata.faceHash = NULL;
 }
 
 static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
@@ -200,9 +195,6 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
 	           bm->ftoolflagpool == NULL);  /* make sure we never alloc'd these */
 	BM_mesh_free(bm);
 
-	if (bmd->clnordata.faceHash)
-		BLI_ghash_free(bmd->clnordata.faceHash, NULL, NULL);
-
 	result->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
 
 	return result;



More information about the Bf-blender-cvs mailing list