diff options
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_opdefines.c | 20 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operator_api.h | 5 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.h | 6 |
3 files changed, 25 insertions, 6 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index 7086cea1ace..74d01dca66a 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -1725,6 +1725,12 @@ static BMO_FlagSet bmo_enum_bevel_miter_type[] = { {0, NULL}, }; +static BMO_FlagSet bmo_enum_bevel_vmesh_method[] = { + {BEVEL_VMESH_ADJ, "ADJ"}, + {BEVEL_VMESH_CUTOFF, "CUTOFF"}, + {0, NULL}, +}; + /* * Bevel. * @@ -1735,7 +1741,8 @@ static BMOpDefine bmo_bevel_def = { /* slots_in */ {{"geom", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT | BM_EDGE | BM_FACE}}, /* input edges and vertices */ {"offset", BMO_OP_SLOT_FLT}, /* amount to offset beveled edge */ - {"offset_type", BMO_OP_SLOT_INT, {(int)BMO_OP_SLOT_SUBTYPE_INT_ENUM}, bmo_enum_bevel_offset_type}, /* how to measure the offset */ + {"offset_type", BMO_OP_SLOT_INT, {(int)BMO_OP_SLOT_SUBTYPE_INT_ENUM}, + bmo_enum_bevel_offset_type}, /* how to measure the offset */ {"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 */ @@ -1746,13 +1753,18 @@ static BMOpDefine bmo_bevel_def = { {"mark_sharp", BMO_OP_SLOT_BOOL}, /* extend edge data to allow sharp edges to run across bevels */ {"harden_normals", BMO_OP_SLOT_BOOL}, /* harden normals */ {"face_strength_mode", BMO_OP_SLOT_INT, {(int)BMO_OP_SLOT_SUBTYPE_INT_ENUM}, - bmo_enum_bevel_face_strength_type}, /* whether to set face strength, and which faces to set if so */ + bmo_enum_bevel_face_strength_type}, /* whether to set face strength, and which faces to set if so */ {"miter_outer", BMO_OP_SLOT_INT, {(int)BMO_OP_SLOT_SUBTYPE_INT_ENUM}, - bmo_enum_bevel_miter_type}, /* outer miter kind */ + bmo_enum_bevel_miter_type}, /* outer miter kind */ {"miter_inner", BMO_OP_SLOT_INT, {(int)BMO_OP_SLOT_SUBTYPE_INT_ENUM}, - bmo_enum_bevel_miter_type}, /* outer miter kind */ + bmo_enum_bevel_miter_type}, /* outer miter kind */ {"spread", BMO_OP_SLOT_FLT}, /* amount to offset beveled edge */ {"smoothresh", BMO_OP_SLOT_FLT}, /* for passing mesh's smoothresh, used in hardening */ + {"use_custom_profile", BMO_OP_SLOT_BOOL}, /* Whether to use custom profile feature */ + /* the ProfileWiget struct for the custom profile shape */ + {"custom_profile", BMO_OP_SLOT_PTR, {(int)BMO_OP_SLOT_SUBTYPE_PTR_STRUCT}}, + {"vmesh_method", BMO_OP_SLOT_INT, {(int)BMO_OP_SLOT_SUBTYPE_INT_ENUM}, + bmo_enum_bevel_vmesh_method}, {{'\0'}}, }, /* slots_out */ diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h index 2039289dcd7..dbd2bf076c6 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api.h +++ b/source/blender/bmesh/intern/bmesh_operator_api.h @@ -237,6 +237,7 @@ typedef enum eBMOpSlotSubType_Ptr { BMO_OP_SLOT_SUBTYPE_PTR_SCENE = 101, BMO_OP_SLOT_SUBTYPE_PTR_OBJECT = 102, BMO_OP_SLOT_SUBTYPE_PTR_MESH = 103, + BMO_OP_SLOT_SUBTYPE_PTR_STRUCT = 104, } eBMOpSlotSubType_Ptr; typedef enum eBMOpSlotSubType_Int { BMO_OP_SLOT_SUBTYPE_INT_ENUM = 200, @@ -294,8 +295,8 @@ typedef struct BMOpSlot { BLI_assert(((slot >= (op)->slots_in) && (slot < &(op)->slots_in[BMO_OP_MAX_SLOTS])) || \ ((slot >= (op)->slots_out) && (slot < &(op)->slots_out[BMO_OP_MAX_SLOTS]))) -/* way more than probably needed, compiler complains if limit hit */ -#define BMO_OP_MAX_SLOTS 20 +/* Limit hit, so expanded for bevel operator. Compiler complains if limit is hit. */ +#define BMO_OP_MAX_SLOTS 21 /* BMOpDefine->type_flag */ typedef enum { diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h index 78e8ce04115..9f0107db693 100644 --- a/source/blender/bmesh/intern/bmesh_operators.h +++ b/source/blender/bmesh/intern/bmesh_operators.h @@ -126,6 +126,12 @@ enum { BEVEL_MITER_ARC, }; +/* Bevel vertex mesh creation methods */ +enum { + BEVEL_VMESH_ADJ, + BEVEL_VMESH_CUTOFF, +}; + /* Normal Face Strength values */ enum { FACE_STRENGTH_WEAK = -16384, |