Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-07-21 23:32:00 +0300
committerHans Goudey <h.goudey@me.com>2020-07-21 23:32:00 +0300
commit4aa2a5481cec4edc4694ee1edbde4ed3f3986313 (patch)
tree0dd39e7392e62963a2bcb7d82249e9c84e032fb2 /source/blender/bmesh/intern/bmesh_opdefines.c
parenta39da2cbca19102589d5141c80a6bc013bd4c963 (diff)
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.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_opdefines.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index 67c0fdba12b..4117ad67dd3 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -1755,6 +1755,12 @@ static BMO_FlagSet bmo_enum_bevel_vmesh_method[] = {
{0, NULL},
};
+static BMO_FlagSet bmo_enum_bevel_affect_type[] = {
+ {BEVEL_AFFECT_VERTICES, "VERTICES"},
+ {BEVEL_AFFECT_EDGES, "EDGES"},
+ {0, NULL},
+};
+
/*
* Bevel.
*
@@ -1768,10 +1774,11 @@ static BMOpDefine bmo_bevel_def = {
{"offset_type", BMO_OP_SLOT_INT, {(int)BMO_OP_SLOT_SUBTYPE_INT_ENUM},
bmo_enum_bevel_offset_type}, /* how to measure the offset */
{"profile_type", BMO_OP_SLOT_INT, {(int)BMO_OP_SLOT_SUBTYPE_INT_ENUM},
- bmo_enum_bevel_profile_type}, /* The profile type to use for bevel. */
+ bmo_enum_bevel_profile_type}, /* The profile type to use for bevel. */
{"segments", BMO_OP_SLOT_INT}, /* number of segments in bevel */
{"profile", BMO_OP_SLOT_FLT}, /* profile shape, 0->1 (.5=>round) */
- {"vertex_only", BMO_OP_SLOT_BOOL}, /* only bevel vertices, not edges */
+ {"affect", BMO_OP_SLOT_INT, {(int)BMO_OP_SLOT_SUBTYPE_INT_ENUM},
+ bmo_enum_bevel_affect_type}, /* Whether to bevel vertices or edges. */
{"clamp_overlap", BMO_OP_SLOT_BOOL}, /* do not allow beveled edges/vertices to overlap each other */
{"material", BMO_OP_SLOT_INT}, /* material for bevel faces, -1 means get from adjacent faces */
{"loop_slide", BMO_OP_SLOT_BOOL}, /* prefer to slide along edges to having even widths */