[Bf-blender-cvs] [ee192a35e8a] master: Cleanup: comments (long lines) in bmesh

Campbell Barton noreply at git.blender.org
Mon Apr 29 14:08:38 CEST 2019


Commit: ee192a35e8a0122e39c3d4d12eb62a2e26344ca7
Author: Campbell Barton
Date:   Mon Apr 29 22:04:24 2019 +1000
Branches: master
https://developer.blender.org/rBee192a35e8a0122e39c3d4d12eb62a2e26344ca7

Cleanup: comments (long lines) in bmesh

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

M	source/blender/bmesh/bmesh.h
M	source/blender/bmesh/bmesh_class.h
M	source/blender/bmesh/intern/bmesh_construct.c
M	source/blender/bmesh/intern/bmesh_core.c
M	source/blender/bmesh/intern/bmesh_edgeloop.c
M	source/blender/bmesh/intern/bmesh_iterators_inline.h
M	source/blender/bmesh/intern/bmesh_marking.c
M	source/blender/bmesh/intern/bmesh_mesh.c
M	source/blender/bmesh/intern/bmesh_mesh_conv.c
M	source/blender/bmesh/intern/bmesh_mesh_validate.c
M	source/blender/bmesh/intern/bmesh_mods.c
M	source/blender/bmesh/intern/bmesh_polygon.c
M	source/blender/bmesh/intern/bmesh_polygon_edgenet.c
M	source/blender/bmesh/intern/bmesh_query.c
M	source/blender/bmesh/intern/bmesh_walkers_impl.c
M	source/blender/bmesh/operators/bmo_bridge.c
M	source/blender/bmesh/operators/bmo_connect_pair.c
M	source/blender/bmesh/operators/bmo_create.c
M	source/blender/bmesh/operators/bmo_dissolve.c
M	source/blender/bmesh/operators/bmo_inset.c
M	source/blender/bmesh/operators/bmo_join_triangles.c
M	source/blender/bmesh/operators/bmo_normals.c
M	source/blender/bmesh/operators/bmo_primitive.c
M	source/blender/bmesh/operators/bmo_removedoubles.c
M	source/blender/bmesh/operators/bmo_rotate_edges.c
M	source/blender/bmesh/tools/bmesh_beautify.c
M	source/blender/bmesh/tools/bmesh_bevel.c
M	source/blender/bmesh/tools/bmesh_decimate_collapse.c
M	source/blender/bmesh/tools/bmesh_decimate_dissolve.c
M	source/blender/bmesh/tools/bmesh_path_region.c

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

diff --git a/source/blender/bmesh/bmesh.h b/source/blender/bmesh/bmesh.h
index dce6b8b79ec..b7356a89314 100644
--- a/source/blender/bmesh/bmesh.h
+++ b/source/blender/bmesh/bmesh.h
@@ -22,7 +22,8 @@
  *
  * \addtogroup bmesh BMesh
  *
- * \brief BMesh is a non-manifold boundary representation designed to support advanced editing operations.
+ * \brief BMesh is a non-manifold boundary representation
+ * designed to support advanced editing operations.
  * \section bm_structure The Structure
  *
  * BMesh stores topology in four main element structures:
@@ -32,7 +33,8 @@
  * - Edges - BMEdge
  * - Verts - BMVert
  * \subsection bm_header_flags Header Flags
- * Each element (vertex/edge/face/loop) in a mesh has an associated bit-field called "header flags".
+ * Each element (vertex/edge/face/loop)
+ * in a mesh has an associated bit-field called "header flags".
  *
  * BMHeader flags should **never** be read or written to by bmesh operators (see Operators below).
  *
@@ -81,7 +83,8 @@
  * See source/blender/bmesh/bmesh_query.h for more misc. queries.
  * \section bm_api The BMesh API
  *
- * One of the goals of the BMesh API is to make it easy and natural to produce highly maintainable code.
+ * One of the goals of the BMesh API is to make it easy
+ * and natural to produce highly maintainable code.
  * Code duplication, etc are avoided where possible.
  * \subsection bm_iter_api Iterator API
  *
@@ -95,15 +98,18 @@
  * though a mechanism for plugging in new walkers needs to be added at some point.
  *
  * Most topological queries should go through these two APIs;
- * there are additional functions you can use for topological iteration, but their meant for internal bmesh code.
+ * there are additional functions you can use for topological iteration,
+ * but their meant for internal bmesh code.
  *
- * Note that the walker API supports delimiter flags, to allow the caller to flag elements not to walk past.
+ * Note that the walker API supports delimiter flags,
+ * to allow the caller to flag elements not to walk past.
  * \subsection bm_ops Operators
  *
  * Operators are an integral part of BMesh. Unlike regular blender operators,
  * BMesh operators **bmo's** are designed to be nested (e.g. call other operators).
  *
- * Each operator has a number of input/output "slots" which are used to pass settings & data into/out of the operator
+ * Each operator has a number of input/output "slots"
+ * which are used to pass settings & data into/out of the operator
  * (and allows for chaining operators together).
  *
  * These slots are identified by name, using strings.
@@ -111,7 +117,8 @@
  * Access to slots is done with ``BMO_slot_***()`` functions.
  * \subsection bm_tool_flags Tool Flags
  *
- * The BMesh API provides a set of flags for faces, edges and vertices, which are private to an operator.
+ * The BMesh API provides a set of flags for faces, edges and vertices,
+ * which are private to an operator.
  * These flags may be used by the client operator code as needed
  * (a common example is flagging elements for use in another operator).
  * Each call to an operator allocates it's own set of tool flags when it's executed,
@@ -140,7 +147,8 @@
  * - map     - BMO_OP_SLOT_MAPPING - simple hash map.
  * \subsection bm_slot_iter Slot Iterators
  *
- * Access to element buffers or maps must go through the slot iterator api, defined in bmesh_operators.h.
+ * Access to element buffers or maps must go through the slot iterator api,
+ * defined in bmesh_operators.h.
  * Use #BMO_ITER where ever possible.
  * \subsection bm_elem_buf Element Buffers
  *
@@ -149,14 +157,16 @@
  * Many operators take in a buffer of elements, process it,
  * then spit out a new one; this allows operators to be chained together.
  *
- * \note Element buffers may have elements of different types within the same buffer (this is supported by the API.
+ * \note Element buffers may have elements of different types within the same buffer
+ * (this is supported by the API.
  * \section bm_fname Function Naming Conventions
  *
  * These conventions should be used throughout the bmesh module.
  *
  * - ``bmesh_kernel_*()`` - Low level API, for primitive functions that others are built ontop of.
  * - ``bmesh_***()`` - Low level API function.
- * - ``bm_***()`` -     'static' functions, not apart of the API at all, but use prefix since they operate on BMesh data.
+ * - ``bm_***()`` -     'static' functions, not apart of the API at all,
+ *   but use prefix since they operate on BMesh data.
  * - ``BM_***()`` -     High level BMesh API function for use anywhere.
  * - ``BMO_***()`` -    High level operator API function for use anywhere.
  * - ``bmo_***()`` -    Low level / internal operator API functions.
@@ -168,11 +178,14 @@
  *
  * \subsection bm_todo_optimize Optimizations
  *
- * - skip normal calc when its not needed (when calling chain of operators & for modifiers, flag as dirty)
- * - skip BMO flag allocation, its not needed in many cases, this is fairly redundant to calc by default.
- * - ability to call BMO's with option not to create return data (will save some time)
- * - binary diff UNDO, currently this uses huge amount of ram when all shapes are stored for each undo step for eg.
- * - use two different iterator types for BMO map/buffer types.
+ * - Skip normal calc when its not needed
+ *   (when calling chain of operators & for modifiers, flag as dirty)
+ * - Skip BMO flag allocation, its not needed in many cases,
+ *   this is fairly redundant to calc by default.
+ * - Ability to call BMO's with option not to create return data (will save some time)
+ * - Binary diff UNDO, currently this uses huge amount of ram
+ *   when all shapes are stored for each undo step for eg.
+ * - Use two different iterator types for BMO map/buffer types.
  */
 
 #ifdef __cplusplus
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index 2cc5b1b8097..8349dee06e2 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -23,7 +23,8 @@
 
 /* bmesh data structures */
 
-/* dissable holes for now, these are ifdef'd because they use more memory and cant be saved in DNA currently */
+/* dissable holes for now,
+ * these are ifdef'd because they use more memory and cant be saved in DNA currently */
 // #define USE_BMESH_HOLES
 
 struct BMEdge;
@@ -98,10 +99,12 @@ typedef struct BMVert {
   float co[3]; /* vertex coordinates */
   float no[3]; /* vertex normal */
 
-  /* pointer to (any) edge using this vertex (for disk cycles)
+  /**
+   * Pointer to (any) edge using this vertex (for disk cycles).
    *
-   * note: some higher level functions set this to different edges that use this vertex,
-   *       which is a bit of an abuse of internal bmesh data but also works OK for now (use with care!).
+   * \note Some higher level functions set this to different edges that use this vertex,
+   * which is a bit of an abuse of internal bmesh data but also works OK for now
+   * (use with care!).
    */
   struct BMEdge *e;
 } BMVert;
@@ -125,8 +128,12 @@ typedef struct BMEdge {
    * to access the other loops using the edge */
   struct BMLoop *l;
 
-  /* disk cycle pointers
-   * relative data: d1 indicates indicates the next/prev edge around vertex v1 and d2 does the same for v2 */
+  /**
+   * Disk Cycle Pointers
+   *
+   * relative data: d1 indicates indicates the next/prev
+   * edge around vertex v1 and d2 does the same for v2.
+   */
   BMDiskLink v1_disk_link, v2_disk_link;
 } BMEdge;
 
@@ -281,7 +288,10 @@ typedef struct BMLoopNorEditData {
 
 typedef struct BMLoopNorEditDataArray {
   BMLoopNorEditData *lnor_editdata;
-  /* This one has full amount of loops, used to map loop index to actual BMLoopNorEditData struct. */
+  /**
+   * This one has full amount of loops,
+   * used to map loop index to actual BMLoopNorEditData struct.
+   */
   BMLoopNorEditData **lidx_to_lnor_editdata;
 
   int cd_custom_normal_offset;
diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c
index 4a4ea1e17a7..224f6ad1e5c 100644
--- a/source/blender/bmesh/intern/bmesh_construct.c
+++ b/source/blender/bmesh/intern/bmesh_construct.c
@@ -124,7 +124,8 @@ BMFace *BM_face_create_quad_tri(BMesh *bm,
 /**
  * \brief copies face loop data from shared adjacent faces.
  *
- * \param filter_fn: A function that filters the source loops before copying (don't always want to copy all)
+ * \param filter_fn: A function that filters the source loops before copying
+ * (don't always want to copy all).
  *
  * \note when a matching edge is found, both loops of that edge are copied
  * this is done since the face may not be completely surrounded by faces,
diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c
index 36abb1dc5c4..dfea4cbf7c0 100644
--- a/source/blender/bmesh/intern/bmesh_core.c
+++ b/source/blender/bmesh/intern/bmesh_core.c
@@ -140,7 +140,8 @@ BMVert *BM_vert_create(BMesh *bm,
  * \brief Main function for creating a new edge.
  *
  * \note Duplicate edges are supported by the API however users should _never_ see them.
- * so unless you need a unique edge or know the edge won't exist, you should call with \a no_double = true
+ * so unless you need a unique edge or know the edge won't exist,
+ * you should call with \a no_double = true.
  */
 BMEdge *BM_edge_create(
     BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *e_example, const eBMCreateFlag create_flag)
@@ -1417,8 +1418,9 @@ static BMFace *bm_face_create__sfme(BMesh *bm, BMFace *f_example)
  *
  * \warning this is a low level function, most likely you want to use #BM_face_split()
  *
- * Takes as input two vertices in a single face. An edge is created which divides the original face
- * into two distinct regions. One of the regions is assigned to the original face and it is closed off.
+ * Takes as input two vertices in a single face.
+ * An edge is created which divides the original face into two distinct regions.
+ * One of the regions is assigned to the original face and it is closed off.
  * The second region has a new face assigned to it.
  *
  * \par Examples:
@@ -1944,7 +1946,8 @@ BMEdge *bmesh_kernel_join_

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list