[Bf-blender-cvs] [fdd7b788ace] soc-2017-normal-tools: Cleanup: comments.
Bastien Montagne
noreply at git.blender.org
Fri Feb 23 20:38:28 CET 2018
Commit: fdd7b788ace22d5bdf4fc48fcc6ea5b90fd2a615
Author: Bastien Montagne
Date: Fri Feb 23 20:36:33 2018 +0100
Branches: soc-2017-normal-tools
https://developer.blender.org/rBfdd7b788ace22d5bdf4fc48fcc6ea5b90fd2a615
Cleanup: comments.
===================================================================
M source/blender/blenkernel/BKE_mesh.h
M source/blender/blenkernel/intern/editmesh.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 6fdec0ee422..2b06728cec5 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -216,8 +216,9 @@ typedef struct MLoopNorSpace {
float vec_ortho[3]; /* Third vector, orthogonal to vec_lnor and vec_ref. */
float ref_alpha; /* Reference angle, around vec_ortho, in ]0, pi] range (0.0 marks that space as invalid). */
float ref_beta; /* Reference angle, around vec_lnor, in ]0, 2pi] range (0.0 marks that space as invalid). */
- /* All loops using this lnor space (i.e. smooth fan of loops), as (depending on owning MLoopNorSpaceArrary.flags):
- * - Indices (uint_in_ptr), or
+ /* All loops using this lnor space (i.e. smooth fan of loops),
+ * as (depending on owning MLoopNorSpaceArrary.data_type):
+ * - Indices (uint_in_ptr), or
* - BMLoop pointers. */
struct LinkNode *loops;
char flags;
diff --git a/source/blender/blenkernel/intern/editmesh.c b/source/blender/blenkernel/intern/editmesh.c
index a9670472420..e326d6f8e0c 100644
--- a/source/blender/blenkernel/intern/editmesh.c
+++ b/source/blender/blenkernel/intern/editmesh.c
@@ -269,8 +269,13 @@ void BKE_editmesh_lnorspace_update(BMEditMesh *em)
{
BMesh *bm = em->bm;
+ /* We need to create clnors data is none exist yet, otherwise there is no way to edit them. */
/* Similar code to MESH_OT_customdata_custom_splitnormals_add operator, we want to keep same shading
* in case we were using autosmooth so far... */
+ /* Note: there is a problem here, which is that is someone starts a normal editing operation on previously
+ * autosmooth-ed mesh, and cancel that operation, generated clnors data remain, with related sharp edges
+ * (and hence autosmooth is 'lost').
+ * Not sure how critical this is, and how to fix that issue? */
if (!CustomData_has_layer(&bm->ldata, CD_CUSTOMLOOPNORMAL)) {
Mesh *me = em->ob->data;
if (me->flag & ME_AUTOSMOOTH) {
More information about the Bf-blender-cvs
mailing list