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:
authorRohan Rathi <rohanrathi08@gmail.com>2018-08-04 20:01:53 +0300
committerRohan Rathi <rohanrathi08@gmail.com>2018-08-04 20:01:53 +0300
commit997b35f57a5454b5a43d47fddd84459bd19936f0 (patch)
tree9892b4b7ef05c481ac9594ba17751e3d7c8115a3 /source/blender/bmesh
parente8748e5ae7955b31c17c6cddb5e092202b39fcfd (diff)
Added comments on hn_mode, BMOps on bevel
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c10
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.h8
3 files changed, 9 insertions, 11 deletions
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[];