[Bf-blender-cvs] [7beb57f3bdf] master: Cleanup: update comments

Campbell Barton noreply at git.blender.org
Mon Jun 28 08:14:47 CEST 2021


Commit: 7beb57f3bdf5d40aa4a3581367625ac7312b42a8
Author: Campbell Barton
Date:   Mon Jun 28 16:02:52 2021 +1000
Branches: master
https://developer.blender.org/rB7beb57f3bdf5d40aa4a3581367625ac7312b42a8

Cleanup: update comments

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

M	source/blender/bmesh/intern/bmesh_operator_api_inline.h
M	source/blender/editors/interface/interface_align.c
M	source/blender/editors/space_view3d/view3d_fly.c
M	source/blender/editors/space_view3d/view3d_walk.c

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

diff --git a/source/blender/bmesh/intern/bmesh_operator_api_inline.h b/source/blender/bmesh/intern/bmesh_operator_api_inline.h
index 43628f01bc8..85701a76433 100644
--- a/source/blender/bmesh/intern/bmesh_operator_api_inline.h
+++ b/source/blender/bmesh/intern/bmesh_operator_api_inline.h
@@ -22,15 +22,10 @@
 
 #pragma once
 
-/* tool flag API. never, ever ever should tool code put junk in
- * header flags (element->head.flag), nor should they use
- * element->head.eflag1/eflag2.  instead, use this api to set
- * flags.
- *
- * if you need to store a value per element, use a
- * ghash or a mapping slot to do it. */
+/* Tool Flag API: Tool code must never put junk in header flags (#BMHeader.hflag)
+ * instead, use this API to set flags.
+ * If you need to store a value per element, use a #GHash or a mapping slot to do it. */
 
-/* flags 15 and 16 (1 << 14 and 1 << 15) are reserved for bmesh api use */
 ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2) BLI_INLINE
     short _bmo_elem_flag_test(BMesh *bm, const BMFlagLayer *oflags, const short oflag)
 {
diff --git a/source/blender/editors/interface/interface_align.c b/source/blender/editors/interface/interface_align.c
index 1f9c736a5f3..dbfdfbf7950 100644
--- a/source/blender/editors/interface/interface_align.c
+++ b/source/blender/editors/interface/interface_align.c
@@ -590,7 +590,8 @@ static void ui_block_align_calc_but(uiBut *first, short nr)
 
   /* rows == 0: 1 row, cols == 0: 1 column */
 
-  /* note;  how it uses 'flag' in loop below (either set it, or OR it) is confusing */
+  /* NOTE: manipulation of 'flag' in the loop below is confusing.
+   * In some cases it's assigned, other times OR is used. */
   for (but = first, prev = NULL; but && but->alignnr == nr; prev = but, but = but->next) {
     next = but->next;
     if (next && next->alignnr != nr) {
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index c0a95f24f08..3347de73d01 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -757,9 +757,6 @@ static int flyApply(bContext *C, FlyInfo *fly, bool is_confirm)
 #define FLY_ZUP_CORRECT_ACCEL 0.05f /* increase upright momentum each step */
 #define FLY_SMOOTH_FAC 20.0f        /* higher value less lag */
 
-  /* fly mode - Shift+F
-   * a fly loop where the user can move the view as if they are flying
-   */
   RegionView3D *rv3d = fly->rv3d;
 
   /* 3x3 copy of the view matrix so we can move along the view axis */
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index 84515d4a39b..370ed7d12cf 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -989,9 +989,6 @@ static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm)
 #define WALK_MOVE_SPEED base_speed
 #define WALK_BOOST_FACTOR ((void)0, walk->speed_factor)
 
-  /* walk mode - Ctrl+Shift+F
-   * a walk loop where the user can move move the view as if they are in a walk game
-   */
   RegionView3D *rv3d = walk->rv3d;
   ARegion *region = walk->region;



More information about the Bf-blender-cvs mailing list