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:
authorHoward Trickey <howard.trickey@gmail.com>2019-01-18 20:54:10 +0300
committerHoward Trickey <howard.trickey@gmail.com>2019-01-18 20:54:10 +0300
commitb640fd829e3a228561e4d9dba9c830ae22d3ebc7 (patch)
tree431a203d22e26bb816ccc6e3990c54fc41bd3bbd /source/blender/bmesh/intern
parentc9938ebb0064675a17c92e8112fc4d416bba5f7c (diff)
Add miter pattern options.
Will document the new options in release notes, then in manual. Still a bit of work to do on the bulging shape that appears on cube corners if using arc inner miters, but will do that later. Also need to do something smarter in clamp overlap.
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c12
-rw-r--r--source/blender/bmesh/intern/bmesh_operator_api.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.h7
3 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index db4985c62f6..dd913d95778 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -1743,6 +1743,13 @@ static BMO_FlagSet bmo_enum_bevel_face_strength_type[] = {
{0, NULL},
};
+static BMO_FlagSet bmo_enum_bevel_miter_type[] = {
+ {BEVEL_MITER_SHARP, "SHARP"},
+ {BEVEL_MITER_PATCH, "PATCH"},
+ {BEVEL_MITER_ARC, "ARC"},
+ {0, NULL},
+};
+
/*
* Bevel.
*
@@ -1765,6 +1772,11 @@ static BMOpDefine bmo_bevel_def = {
{"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 */
+ {"miter_outer", BMO_OP_SLOT_INT, {(int)BMO_OP_SLOT_SUBTYPE_INT_ENUM},
+ 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 */
+ {"spread", BMO_OP_SLOT_FLT}, /* amount to offset beveled edge */
{"smoothresh", BMO_OP_SLOT_FLT}, /* for passing mesh's smoothresh, used in hardening */
{{'\0'}},
},
diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h
index fd01bec9531..e609500ddc3 100644
--- a/source/blender/bmesh/intern/bmesh_operator_api.h
+++ b/source/blender/bmesh/intern/bmesh_operator_api.h
@@ -246,7 +246,7 @@ typedef struct BMOpSlot {
((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 16
+#define BMO_OP_MAX_SLOTS 20
/* BMOpDefine->type_flag */
typedef enum {
diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h
index 365b5eb4681..dd9c57d6b6d 100644
--- a/source/blender/bmesh/intern/bmesh_operators.h
+++ b/source/blender/bmesh/intern/bmesh_operators.h
@@ -125,6 +125,13 @@ enum {
BEVEL_FACE_STRENGTH_ALL,
};
+/* Bevel miter slot values */
+enum {
+ BEVEL_MITER_SHARP,
+ BEVEL_MITER_PATCH,
+ BEVEL_MITER_ARC,
+};
+
extern const BMOpDefine *bmo_opdefines[];
extern const int bmo_opdefines_total;