[Bf-blender-cvs] [0b79f0c] ui-preview-buttons: Minor cleanup in comments.

Bastien Montagne noreply at git.blender.org
Tue Apr 28 19:13:07 CEST 2015


Commit: 0b79f0c6f1ae1e64902011e13d46fcfd5e26f13b
Author: Bastien Montagne
Date:   Tue Apr 28 14:15:27 2015 +0200
Branches: ui-preview-buttons
https://developer.blender.org/rB0b79f0c6f1ae1e64902011e13d46fcfd5e26f13b

Minor cleanup in comments.

===================================================================

M	source/blender/blenkernel/intern/mesh_mapping.c

===================================================================

diff --git a/source/blender/blenkernel/intern/mesh_mapping.c b/source/blender/blenkernel/intern/mesh_mapping.c
index cc5006e..37b4c5f 100644
--- a/source/blender/blenkernel/intern/mesh_mapping.c
+++ b/source/blender/blenkernel/intern/mesh_mapping.c
@@ -180,8 +180,6 @@ void BKE_mesh_uv_vert_map_free(UvVertMap *vmap)
 }
 
 /**
-
-
  * Generates a map where the key is the vertex and the value is a list
  * of polys or loops that use that vertex as a corner. The lists are allocated
  * from one memory pool.
@@ -254,9 +252,10 @@ void BKE_mesh_vert_loop_map_create(MeshElemMap **r_map, int **r_mem,
 	mesh_vert_poly_or_loop_map_create(r_map, r_mem, mpoly, mloop, totvert, totpoly, totloop, true);
 }
 
-/* Generates a map where the key is the vertex and the value is a list
- * of edges that use that vertex as an endpoint. The lists are allocated
- * from one memory pool. */
+/**
+ * Generates a map where the key is the vertex and the value is a list of edges that use that vertex as an endpoint.
+ * The lists are allocated from one memory pool.
+ */
 void BKE_mesh_vert_edge_map_create(MeshElemMap **r_map, int **r_mem,
                                    const MEdge *medge, int totvert, int totedge)
 {
@@ -296,6 +295,10 @@ void BKE_mesh_vert_edge_map_create(MeshElemMap **r_map, int **r_mem,
 	*r_mem = indices;
 }
 
+/**
+ * Generates a map where the key is the edge and the value is a list of polygons that use that edge.
+ * The lists are allocated from one memory pool.
+ */
 void BKE_mesh_edge_poly_map_create(MeshElemMap **r_map, int **r_mem,
                                    const MEdge *UNUSED(medge), const int totedge,
                                    const MPoly *mpoly, const int totpoly,
@@ -403,7 +406,8 @@ void BKE_mesh_origindex_map_create(MeshElemMap **r_map, int **r_mem,
  * Used currently for UVs and 'smooth groups'.
  * \{ */
 
-/** Callback deciding whether the given poly/loop/edge define an island boundary or not.
+/**
+ * Callback deciding whether the given poly/loop/edge define an island boundary or not.
  */
 typedef bool (*MeshRemap_CheckIslandBoundary)(
         const struct MPoly *mpoly, const struct MLoop *mloop, const struct MEdge *medge,
@@ -586,8 +590,7 @@ static void poly_edge_loop_islands_calc(
 }
 
 static bool poly_is_island_boundary_smooth_cb(
-        const MPoly *mp, const MLoop *UNUSED(ml), const MEdge *me,
-        const int nbr_egde_users)
+        const MPoly *mp, const MLoop *UNUSED(ml), const MEdge *me, const int nbr_egde_users)
 {
 	/* Edge is sharp if its poly is sharp, or edge itself is sharp, or edge is not used by exactly two polygons. */
 	return (!(mp->flag & ME_SMOOTH) || (me->flag & ME_SHARP) || (nbr_egde_users != 2));
@@ -719,17 +722,21 @@ void BKE_mesh_loop_islands_add(
  *       not sure we want that at all!
  */
 static bool mesh_check_island_boundary_uv(
-        const MPoly *UNUSED(mp), const MLoop *UNUSED(ml), const MEdge *me,
-        const int UNUSED(nbr_egde_users))
+        const MPoly *UNUSED(mp), const MLoop *UNUSED(ml), const MEdge *me, const int UNUSED(nbr_egde_users))
 {
 	/* Edge is UV boundary if tagged as seam. */
 	return (me->flag & ME_SEAM) != 0;
 }
 
 /**
- * \note all this could be optimized...
- * Not sure it would be worth the more complex code, though, those loops
- * are supposed to be really quick to do...
+ * Calculate UV islands.
+ *
+ * \note Currently we only consider edges tagges as seams as UV boundaries. This has the advantages of simplicity,
+ *     and being valid/common to all UV maps. However, it means actual UV islands whithout matching UV seams
+ *     will not be handled correctly...
+ *
+ * \note All this could be optimized...
+ *     Not sure it would be worth the more complex code, though, those loops are supposed to be really quick to do...
  */
 bool BKE_mesh_calc_islands_loop_poly_uv(
         MVert *UNUSED(verts), const int UNUSED(totvert),




More information about the Bf-blender-cvs mailing list