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-03 21:39:52 +0300
committerHoward Trickey <howard.trickey@gmail.com>2019-01-03 21:39:52 +0300
commitaef01c47e6334b214520f14c72b01de99387f122 (patch)
treef8edbb1bc5cce8c3ea5a2faaffd7462f14a69fa9 /source/blender/bmesh/intern/bmesh_opdefines.c
parentbdfc10e482c4c6724a45259c4b2f2d7cde7d26d0 (diff)
Fix T58113 Multiple problems with bevel harden normals.
Move the bevel hardening code all into bmesh_bevel.c. Based on user feedback, rewrote the bevel hardening algorithm to be more what users want. Based on user feedback, changed the UI, removing some not-useful options. Now hardening normals while beveling is enabled by a simple checkbox. Now setting face strength gives options for which faces get their face strength set.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_opdefines.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index 519ffa5ed59..7a6cb814cc9 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -1734,11 +1734,11 @@ static BMO_FlagSet bmo_enum_bevel_offset_type[] = {
{0, NULL},
};
-static BMO_FlagSet bmo_enum_bevel_harden_normal_type[] = {
- {BEVEL_HN_NONE, "NONE"},
- {BEVEL_HN_FACE, "FACE"},
- {BEVEL_HN_ADJ, "ADJACENT"},
- {BEVEL_HN_FIX_SHA, "FIXED_NORMAL_SHADING"},
+static BMO_FlagSet bmo_enum_bevel_face_strength_type[] = {
+ {BEVEL_FACE_STRENGTH_NONE, "NONE"},
+ {BEVEL_FACE_STRENGTH_NEW, "NEW"},
+ {BEVEL_FACE_STRENGTH_AFFECTED, "AFFECTED"},
+ {BEVEL_FACE_STRENGTH_ALL, "ALL"},
{0, NULL},
};
@@ -1761,15 +1761,15 @@ static BMOpDefine bmo_bevel_def = {
{"loop_slide", BMO_OP_SLOT_BOOL}, /* prefer to slide along edges to having even widths */
{"mark_seam", BMO_OP_SLOT_BOOL}, /* extend edge data to allow seams to run across bevels */
{"mark_sharp", BMO_OP_SLOT_BOOL}, /* extend edge data to allow sharp edges to run across bevels */
- {"strength", BMO_OP_SLOT_FLT}, /* strength of calculated normal in range (0, 1) for custom clnors */
- {"hnmode", BMO_OP_SLOT_INT, {(int)BMO_OP_SLOT_SUBTYPE_INT_ENUM}, bmo_enum_bevel_harden_normal_type}, /* harden normals mode used in bevel, if enabled */
+ {"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 */
{{'\0'}},
},
/* slots_out */
{{"faces.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}}, /* output faces */
{"edges.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}}, /* output edges */
{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */
- {"normals.out", BMO_OP_SLOT_MAPPING, {(int)BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL}}, /* output normals per vertex for beveled edges */
{{'\0'}},
},