From 997b35f57a5454b5a43d47fddd84459bd19936f0 Mon Sep 17 00:00:00 2001 From: Rohan Rathi Date: Sat, 4 Aug 2018 22:31:53 +0530 Subject: Added comments on hn_mode, BMOps on bevel --- source/blender/bmesh/intern/bmesh_mesh.c | 2 -- source/blender/bmesh/intern/bmesh_opdefines.c | 10 +++++----- source/blender/bmesh/intern/bmesh_operators.h | 8 ++++---- 3 files changed, 9 insertions(+), 11 deletions(-) (limited to 'source/blender/bmesh') diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index 96707335081..4059cf27f23 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -320,7 +320,6 @@ void BM_mesh_free(BMesh *bm) */ /* We use that existing internal API flag, assuming no other tool using it would run concurrently to clnors editing. */ -/* XXX Should we rather add a new internal flag? */ #define BM_LNORSPACE_UPDATE _FLAG_MF typedef struct BMEdgesCalcVectorsData { @@ -1077,7 +1076,6 @@ void BM_lnorspacearr_store(BMesh *bm, float(*r_lnors)[3]) bm->spacearr_dirty &= ~(BM_SPACEARR_DIRTY | BM_SPACEARR_DIRTY_ALL); } -/* will change later */ #define CLEAR_SPACEARRAY_THRESHOLD(x) ((x) / 2) void BM_lnorspace_invalidate(BMesh *bm, const bool do_invalidate_all) diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index 49d160f5d4a..d9093e774e6 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -1736,17 +1736,17 @@ static BMOpDefine bmo_bevel_def = { {"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 */ - {"mark_seam", BMO_OP_SLOT_BOOL}, - {"mark_sharp", BMO_OP_SLOT_BOOL}, - {"strength", BMO_OP_SLOT_FLT}, - {"hnmode", BMO_OP_SLOT_INT}, + {"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}, /* harden normals mode used in bevel if enabled */ {{'\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}, + {"normals.out", BMO_OP_SLOT_MAPPING}, /* output normals per vertex for beveled edges */ {{'\0'}}, }, diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h index 9f6ac50a3e5..6d518545967 100644 --- a/source/blender/bmesh/intern/bmesh_operators.h +++ b/source/blender/bmesh/intern/bmesh_operators.h @@ -128,10 +128,10 @@ enum { }; enum { - BEVEL_HN_NONE, - BEVEL_HN_FACE, - BEVEL_HN_ADJ, - BEVEL_HN_FIX_SHA, + BEVEL_HN_NONE, /* Disable harden normals */ + BEVEL_HN_FACE, /* harden normals according to face area */ + BEVEL_HN_ADJ, /* harden normals according to adjacent 'beveled' faces */ + BEVEL_HN_FIX_SHA, /* Special mode to fix normal shading continuity */ }; extern const BMOpDefine *bmo_opdefines[]; -- cgit v1.2.3