[Bf-blender-cvs] [e63eb6ed269] master: Cleanup: comment line length (windowmanager)

Campbell Barton noreply at git.blender.org
Sat Apr 20 10:16:17 CEST 2019


Commit: e63eb6ed2696c5d52b35972ab7a1bbda7b5bdc90
Author: Campbell Barton
Date:   Sat Apr 20 10:02:28 2019 +0200
Branches: master
https://developer.blender.org/rBe63eb6ed2696c5d52b35972ab7a1bbda7b5bdc90

Cleanup: comment line length (windowmanager)

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

M	source/blender/windowmanager/WM_api.h
M	source/blender/windowmanager/WM_types.h
M	source/blender/windowmanager/gizmo/intern/wm_gizmo.c
M	source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
M	source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
M	source/blender/windowmanager/intern/wm_event_system.c
M	source/blender/windowmanager/intern/wm_files.c
M	source/blender/windowmanager/intern/wm_files_link.c
M	source/blender/windowmanager/intern/wm_gesture.c
M	source/blender/windowmanager/intern/wm_gesture_ops.c
M	source/blender/windowmanager/intern/wm_init_exit.c
M	source/blender/windowmanager/intern/wm_jobs.c
M	source/blender/windowmanager/intern/wm_keymap.c
M	source/blender/windowmanager/intern/wm_operator_type.c
M	source/blender/windowmanager/intern/wm_operators.c
M	source/blender/windowmanager/intern/wm_stereo.c
M	source/blender/windowmanager/intern/wm_toolsystem.c
M	source/blender/windowmanager/intern/wm_window.c
M	source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c
M	source/blender/windowmanager/wm_event_types.h

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

diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index af6f2559cae..5cc70aecd8d 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -635,7 +635,8 @@ enum {
   WM_JOB_SUSPEND = (1 << 3),
 };
 
-/* identifying jobs by owner alone is unreliable, this isnt saved, order can change (keep 0 for 'any') */
+/** Identifying jobs by owner alone is unreliable, this isnt saved,
+ * order can change (keep 0 for 'any'). */
 enum {
   WM_JOB_TYPE_ANY = 0,
   WM_JOB_TYPE_COMPOSITE,
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 425853c7a96..154c4837a68 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -427,7 +427,8 @@ typedef struct wmGesture {
   int modal_state;
 
   /* For modal operators which may be running idle, waiting for an event to activate the gesture.
-   * Typically this is set when the user is click-dragging the gesture (border and circle select for eg). */
+   * Typically this is set when the user is click-dragging the gesture
+   * (border and circle select for eg). */
   uint is_active : 1;
   /* Previous value of is-active (use to detect first run & edge cases). */
   uint is_active_prev : 1;
@@ -526,7 +527,8 @@ typedef enum { /* motion progress, for modal handlers */
 typedef struct wmNDOFMotionData {
   /* awfully similar to GHOST_TEventNDOFMotionData... */
   /* Each component normally ranges from -1 to +1, but can exceed that.
-   * These use blender standard view coordinates, with positive rotations being CCW about the axis. */
+   * These use blender standard view coordinates,
+   * with positive rotations being CCW about the axis. */
   float tvec[3]; /* translation */
   float rvec[3]; /* rotation: */
   /* axis = (rx,ry,rz).normalized */
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo.c
index 997afb1dc6c..e2e5096ef99 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo.c
@@ -462,7 +462,8 @@ bool wm_gizmo_select_and_highlight(bContext *C, wmGizmoMap *gzmap, wmGizmo *gz)
 /**
  * Special function to run from setup so gizmos start out interactive.
  *
- * We could do this when linking them, but this complicates things since the window update code needs to run first.
+ * We could do this when linking them,
+ * but this complicates things since the window update code needs to run first.
  */
 void WM_gizmo_modal_set_from_setup(struct wmGizmoMap *gzmap,
                                    struct bContext *C,
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
index b37991ec8cd..5aecab122a2 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
@@ -188,7 +188,8 @@ wmGizmo *wm_gizmogroup_find_intersected_gizmo(const wmGizmoGroup *gzgroup,
 }
 
 /**
- * Adds all gizmos of \a gzgroup that can be selected to the head of \a listbase. Added items need freeing!
+ * Adds all gizmos of \a gzgroup that can be selected to the head of \a listbase.
+ * Added items need freeing!
  */
 void wm_gizmogroup_intersectable_gizmos_to_list(const wmGizmoGroup *gzgroup, ListBase *listbase)
 {
@@ -219,7 +220,8 @@ void WM_gizmogroup_ensure_init(const bContext *C, wmGizmoGroup *gzgroup)
     gzgroup->init_flag |= WM_GIZMOGROUP_INIT_SETUP;
   }
 
-  /* refresh may be called multiple times, this just ensures its called at least once before we draw. */
+  /* Refresh may be called multiple times,
+   * this just ensures its called at least once before we draw. */
   if (UNLIKELY((gzgroup->init_flag & WM_GIZMOGROUP_INIT_REFRESH) == 0)) {
     if (gzgroup->type->refresh) {
       gzgroup->type->refresh(C, gzgroup);
@@ -237,7 +239,8 @@ bool WM_gizmo_group_type_poll(const bContext *C, const struct wmGizmoGroupType *
       return false;
     }
   }
-  /* Check for poll function, if gizmo-group belongs to an operator, also check if the operator is running. */
+  /* Check for poll function, if gizmo-group belongs to an operator,
+   * also check if the operator is running. */
   return (!gzgt->poll || gzgt->poll(C, (wmGizmoGroupType *)gzgt));
 }
 
@@ -679,7 +682,8 @@ static wmKeyMap *gizmogroup_tweak_modal_keymap(wmKeyConfig *keyconf, const char
  */
 wmKeyMap *WM_gizmogroup_keymap_common(const wmGizmoGroupType *gzgt, wmKeyConfig *config)
 {
-  /* Use area and region id since we might have multiple gizmos with the same name in different areas/regions */
+  /* Use area and region id since we might have multiple gizmos
+   * with the same name in different areas/regions. */
   wmKeyMap *km = WM_keymap_ensure(
       config, gzgt->name, gzgt->gzmap_params.spaceid, gzgt->gzmap_params.regionid);
 
@@ -694,7 +698,8 @@ wmKeyMap *WM_gizmogroup_keymap_common(const wmGizmoGroupType *gzgt, wmKeyConfig
  */
 wmKeyMap *WM_gizmogroup_keymap_common_select(const wmGizmoGroupType *gzgt, wmKeyConfig *config)
 {
-  /* Use area and region id since we might have multiple gizmos with the same name in different areas/regions */
+  /* Use area and region id since we might have multiple gizmos
+   * with the same name in different areas/regions. */
   wmKeyMap *km = WM_keymap_ensure(
       config, gzgt->name, gzgt->gzmap_params.spaceid, gzgt->gzmap_params.regionid);
   /* FIXME(campbell) */
@@ -759,7 +764,8 @@ struct wmGizmoGroupTypeRef *WM_gizmomaptype_group_find(struct wmGizmoMapType *gz
 }
 
 /**
- * Use this for registering gizmos on startup. For runtime, use #WM_gizmomaptype_group_link_runtime.
+ * Use this for registering gizmos on startup.
+ * For runtime, use #WM_gizmomaptype_group_link_runtime.
  */
 wmGizmoGroupTypeRef *WM_gizmomaptype_group_link(wmGizmoMapType *gzmap_type, const char *idname)
 {
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
index 33c58f8563d..db6b24376ca 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
@@ -369,8 +369,9 @@ static void gizmomap_prepare_drawing(wmGizmoMap *gzmap,
       continue;
     }
 
-    /* needs to be initialized on first draw */
-    /* XXX weak: Gizmo-group may skip refreshing if it's invisible (map gets untagged nevertheless) */
+    /* Needs to be initialized on first draw. */
+    /* XXX weak: Gizmo-group may skip refreshing if it's invisible
+     * (map gets untagged nevertheless). */
     if (gzmap->update_flag[drawstep] & GIZMOMAP_IS_REFRESH_CALLBACK) {
       /* force refresh again. */
       gzgroup->init_flag &= ~WM_GIZMOGROUP_INIT_REFRESH;
@@ -402,8 +403,9 @@ static void gizmos_draw_list(const wmGizmoMap *gzmap, const bContext *C, ListBas
     return;
   }
 
-  /* TODO this will need it own shader probably? don't think it can be handled from that point though. */
-  /*  const bool use_lighting = (U.gizmo_flag & V3D_GIZMO_SHADED) != 0; */
+  /* TODO(campbell): This will need it own shader probably?
+   * Don't think it can be handled from that point though. */
+  /* const bool use_lighting = (U.gizmo_flag & V3D_GIZMO_SHADED) != 0; */
 
   bool is_depth_prev = false;
 
@@ -414,7 +416,8 @@ static void gizmos_draw_list(const wmGizmoMap *gzmap, const bContext *C, ListBas
 
     bool is_depth = (gz->parent_gzgroup->type->flag & WM_GIZMOGROUPTYPE_DEPTH_3D) != 0;
 
-    /* Weak! since we don't 100% support depth yet (select ignores depth) always show highlighted */
+    /* Weak! since we don't 100% support depth yet (select ignores depth)
+     * always show highlighted. */
     if (is_depth && (gz->state & WM_GIZMO_STATE_HIGHLIGHT)) {
       is_depth = false;
     }
@@ -472,7 +475,8 @@ static void gizmo_draw_select_3D_loop(const bContext *C,
   int select_id = 0;
   wmGizmo *gz;
 
-  /* TODO(campbell): this depends on depth buffer being written to, currently broken for the 3D view. */
+  /* TODO(campbell): this depends on depth buffer being written to,
+   * currently broken for the 3D view. */
   bool is_depth_prev = false;
   bool is_depth_skip_prev = false;
 
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index d61f9be170d..fbe3253878f 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -123,7 +123,8 @@ wmEvent *wm_event_add_ex(wmWindow *win,
     BLI_addtail(&win->queue, event);
   }
   else {
-    /* note, strictly speaking this breaks const-correctness, however we're only changing 'next' member */
+    /* Note: strictly speaking this breaks const-correctness,
+     * however we're only changing 'next' member. */
     BLI_insertlinkafter(&win->queue, (void *)event_to_add_after, event);
   }
   return event;
@@ -354,7 +355,8 @@ void wm_event_do_depsgraph(bContext *C)
 }
 
 /**
- * Was part of #wm_event_do_notifiers, split out so it can be called once before entering the #WM_main loop.
+ * Was part of #wm_event_do_notifiers,
+ * split out so it can be called once before entering the #WM_main loop.
  * This ensures operators don't run before the UI and depsgraph are initialized.
  */
 void wm_event_do_refresh_wm_and_depsgraph(bContext *C)
@@ -504,7 +506,12 @@ void wm_event_do_notifiers(bContext *C)
         /* XXX context in notifiers? */
         CTX_wm_window_set(C, win);
 
-        /* printf("notifier win %d screen %s cat %x\n", win->winid, win->screen->id.name + 2, note->category); */
+#  if 0
+        printf("notifier win %d screen %s cat %x\n",
+               win->winid,
+               win->screen->id.name + 2,
+               note->category);
+#  endif
         ED_screen_do_listen(C, note);
 
         for (ar = screen->regionbase.first; ar; ar = ar->next) {
@@ -1031,9 +1038,9 @@ static int wm_operator_exec(bContext *C,
     }
   }
 
-  /* XXX Disabled the repeat check to address part 2 of #31840.
-   *     Carefully checked all calls to wm_operator_exec and WM_operator_repeat, don't see any reason
-   *     why this was needed, but w

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list