From 4aa2a5481cec4edc4694ee1edbde4ed3f3986313 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 21 Jul 2020 16:32:00 -0400 Subject: Bevel: Refactor "Vertex Only" to an enum This matches the change that was done to the bevel modifier so that the interface for the modifier, the active tool, and the operator are consistent. This commit extends the refactor to the bmesh implementation too, so that the parameters in the implementation don't stray too far from what is exposed. Tests are adjusted and still pass. --- source/blender/makesdna/DNA_modifier_types.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna/DNA_modifier_types.h') diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 50b4739e09f..661799b4256 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -409,7 +409,9 @@ typedef struct BevelModifierData { short miter_outer; /** The method to use for creating >2-way intersections */ short vmesh_method; - char _pad0[2]; + /** Whether to affect vertices or edges. */ + char affect_type; + char _pad; /** Controls profile shape (0->1, .5 is round). */ float profile; /** if the MOD_BEVEL_ANGLE is set, @@ -428,7 +430,9 @@ typedef struct BevelModifierData { /* BevelModifierData->flags and BevelModifierData->lim_flags */ enum { - MOD_BEVEL_VERT = (1 << 1), +#ifdef DNA_DEPRECATED_ALLOW + MOD_BEVEL_VERT_DEPRECATED = (1 << 1), +#endif MOD_BEVEL_INVERT_VGROUP = (1 << 2), MOD_BEVEL_ANGLE = (1 << 3), MOD_BEVEL_WEIGHT = (1 << 4), @@ -489,6 +493,12 @@ enum { MOD_BEVEL_VMESH_CUTOFF = 1, }; +/* BevelModifier->affect_type */ +enum { + MOD_BEVEL_AFFECT_VERTICES = 0, + MOD_BEVEL_AFFECT_EDGES = 1, +}; + typedef struct FluidModifierData { ModifierData modifier; -- cgit v1.2.3