[Bf-blender-cvs] [c7f67d60fbe] master: Cleanup: comments (long lines) in editors

Campbell Barton noreply at git.blender.org
Mon Apr 29 11:31:50 CEST 2019


Commit: c7f67d60fbe24df942bcde49aadf480ac6622e71
Author: Campbell Barton
Date:   Mon Apr 29 19:29:41 2019 +1000
Branches: master
https://developer.blender.org/rBc7f67d60fbe24df942bcde49aadf480ac6622e71

Cleanup: comments (long lines) in editors

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

M	source/blender/editors/animation/anim_channels_defines.c
M	source/blender/editors/animation/anim_channels_edit.c
M	source/blender/editors/animation/anim_filter.c
M	source/blender/editors/animation/keyframes_edit.c
M	source/blender/editors/animation/keyframing.c
M	source/blender/editors/animation/keyingsets.c
M	source/blender/editors/armature/armature_intern.h
M	source/blender/editors/armature/armature_naming.c
M	source/blender/editors/armature/armature_relations.c
M	source/blender/editors/armature/armature_select.c
M	source/blender/editors/armature/armature_utils.c
M	source/blender/editors/armature/pose_lib.c
M	source/blender/editors/armature/pose_slide.c
M	source/blender/editors/gpencil/annotate_draw.c
M	source/blender/editors/gpencil/annotate_paint.c
M	source/blender/editors/gpencil/gpencil_brush.c
M	source/blender/editors/gpencil/gpencil_convert.c
M	source/blender/editors/gpencil/gpencil_edit.c
M	source/blender/editors/gpencil/gpencil_paint.c
M	source/blender/editors/include/ED_anim_api.h
M	source/blender/editors/mesh/editmesh_add.c
M	source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
M	source/blender/editors/mesh/editmesh_rip.c
M	source/blender/editors/mesh/editmesh_select.c
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/object/object_add.c
M	source/blender/editors/object/object_constraint.c
M	source/blender/editors/object/object_data_transfer.c
M	source/blender/editors/object/object_vgroup.c
M	source/blender/editors/physics/particle_edit.c
M	source/blender/editors/physics/physics_fluid.c
M	source/blender/editors/render/render_internal.c
M	source/blender/editors/screen/area.c
M	source/blender/editors/screen/screen_draw.c
M	source/blender/editors/screen/screen_ops.c
M	source/blender/editors/sculpt_paint/paint_image_2d.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/editors/space_action/action_edit.c
M	source/blender/editors/space_file/fsmenu.c
M	source/blender/editors/space_graph/graph_draw.c
M	source/blender/editors/space_graph/graph_select.c
M	source/blender/editors/space_graph/graph_utils.c
M	source/blender/editors/space_image/image_ops.c
M	source/blender/editors/space_nla/nla_edit.c
M	source/blender/editors/space_outliner/outliner_dragdrop.c
M	source/blender/editors/space_outliner/outliner_edit.c
M	source/blender/editors/space_outliner/outliner_tree.c
M	source/blender/editors/space_sequencer/sequencer_select.c

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

diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index bab76911449..cb6023e20ea 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -222,7 +222,8 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa
     rgb_uchar_to_float(r_color, cp);
   }
   else {
-    // FIXME: what happens when the indention is 1 greater than what it should be (due to grouping)?
+    /* FIXME: what happens when the indention is 1 greater than what it should be
+     * (due to grouping)? */
     int colOfs = 10 - 10 * indent;
     UI_GetThemeColorShade3fv(TH_SHADE2, colOfs, r_color);
   }
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index d0eb2d187fd..3107eb927e4 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -474,7 +474,8 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac,
   for (ale = anim_data->first; ale; ale = ale->next) {
     /* compare data, and type as main way of identifying the channel */
     if ((ale->data == ale_setting->data) && (ale->type == ale_setting->type)) {
-      /* we also have to check the ID, this is assigned to, since a block may have multiple users */
+      /* We also have to check the ID, this is assigned to,
+       * since a block may have multiple users. */
       /* TODO: is the owner-data more revealing? */
       if (ale->id == ale_setting->id) {
         match = ale;
@@ -1233,9 +1234,10 @@ static void rearrange_action_channels(bAnimContext *ac, bAction *act, eRearrange
   /* Filter visible data. */
   rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_GROUP);
 
-  /* rearrange groups first
-   * - the group's channels will only get considered if nothing happened when rearranging the groups
-   *   i.e. the rearrange function returned 0
+  /* Rearrange groups first:
+   * - The group's channels will only get considered
+   *   if nothing happened when rearranging the groups
+   *   i.e. the rearrange function returned 0.
    */
   do_channels = (rearrange_animchannel_islands(
                      &act->groups, rearrange_func, mode, ANIMTYPE_GROUP, &anim_data_visible) == 0);
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 674f530894d..6a0f7d21f55 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -425,7 +425,8 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
   animedit_get_yscale_factor(ac);
 
   /* get data context info */
-  // XXX: if the below fails, try to grab this info from context instead... (to allow for scripting)
+  /* XXX: if the below fails, try to grab this info from context instead...
+   * (to allow for scripting). */
   return ANIM_animdata_context_getdata(ac);
 }
 
@@ -486,7 +487,8 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
  * Quick macro to test for all three above usability tests, performing the appropriate provided
  * action for each when the AnimData context is appropriate.
  *
- * Priority order for this goes (most important, to least): AnimData blocks, NLA, Drivers, Keyframes.
+ * Priority order for this goes (most important, to least):
+ * AnimData blocks, NLA, Drivers, Keyframes.
  *
  * For this to work correctly,
  * a standard set of data needs to be available within the scope that this
@@ -582,7 +584,8 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
 #define ANIMCHANNEL_ACTIVEOK(ale) \
   (!(filter_mode & ANIMFILTER_ACTIVE) || !(ale->adt) || (ale->adt->flag & ADT_UI_ACTIVE))
 
-/* quick macro to test if an anim-channel (F-Curve, Group, etc.) is selected in an acceptable way */
+/* Quick macro to test if an anim-channel (F-Curve, Group, etc.)
+ * is selected in an acceptable way. */
 #define ANIMCHANNEL_SELOK(test_func) \
   (!(filter_mode & (ANIMFILTER_SEL | ANIMFILTER_UNSEL)) || \
    ((filter_mode & ANIMFILTER_SEL) && test_func) || \
@@ -1210,12 +1213,13 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads,
    */
   for (fcu = first; ((fcu) && (fcu->grp == grp)); fcu = fcu->next) {
     /* special exception for Pose-Channel/Sequence-Strip/Node Based F-Curves:
-     * - the 'Only Selected' and 'Include Hidden' data filters should be applied to sub-ID data which
-     *   can be independently selected/hidden, such as Pose-Channels, Sequence Strips, and Nodes.
-     *   Since these checks were traditionally done as first check for objects, we do the same here
-     * - we currently use an 'approximate' method for getting these F-Curves that doesn't require
-     *   carefully checking the entire path
-     * - this will also affect things like Drivers, and also works for Bone Constraints
+     * - The 'Only Selected' and 'Include Hidden' data filters should be applied to sub-ID data
+     *   which can be independently selected/hidden, such as Pose-Channels, Sequence Strips,
+     *   and Nodes. Since these checks were traditionally done as first check for objects,
+     *   we do the same here.
+     * - We currently use an 'approximate' method for getting these F-Curves that doesn't require
+     *   carefully checking the entire path.
+     * - This will also affect things like Drivers, and also works for Bone Constraints.
      */
     if (ads && owner_id) {
       if ((filter_mode & ANIMFILTER_TMP_IGNORE_ONLYSEL) == 0) {
@@ -1498,7 +1502,8 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac),
       next = nlt->next;
     }
 
-    /* if we're in NLA-tweakmode, don't show this track if it was disabled (due to tweaking) for now
+    /* if we're in NLA-tweakmode, don't show this track if it was disabled
+     * (due to tweaking) for now:
      * - active track should still get shown though (even though it has disabled flag set)
      */
     // FIXME: the channels after should still get drawn, just 'differently',
@@ -1811,7 +1816,8 @@ static size_t animdata_filter_gpencil(bAnimContext *ac,
          */
         if ((filter_mode & ANIMFILTER_DATA_VISIBLE) &&
             !(ads->filterflag & ADS_FILTER_INCL_HIDDEN)) {
-          /* layer visibility - we check both object and base, since these may not be in sync yet */
+          /* Layer visibility - we check both object and base,
+           * since these may not be in sync yet. */
           if ((base->flag & BASE_VISIBLE) == 0) {
             continue;
           }
@@ -2223,7 +2229,8 @@ static size_t animdata_filter_ds_textures(
     }
   }
 
-  /* firstly check that we actuallly have some textures, by gathering all textures in a temp list */
+  /* Firstly check that we actuallly have some textures,
+   * by gathering all textures in a temp list. */
   for (a = 0; a < MAX_MTEX; a++) {
     Tex *tex = (mtex[a]) ? mtex[a]->tex : NULL;
 
@@ -2393,7 +2400,8 @@ static size_t animdata_filter_ds_modifiers(
   /* 1) create a temporary "context" containing all the info we have here to pass to the callback
    *    use to walk through the dependencies of the modifiers
    *
-   * ! Assumes that all other unspecified values (i.e. accumulation buffers) are zero'd out properly
+   * Assumes that all other unspecified values (i.e. accumulation buffers)
+   * are zero'd out properly!
    */
   afm.ac = ac;
   afm.ads = ads;
@@ -2915,7 +2923,8 @@ static size_t animdata_filter_dopesheet_scene(
       tmp_items += animdata_filter_ds_gpencil(ac, &tmp_data, ads, gpd, filter_mode);
     }
 
-    /* TODO: one day, when sequencer becomes its own datatype, perhaps it should be included here */
+    /* TODO: one day, when sequencer becomes its own datatype,
+     * perhaps it should be included here. */
   }
   END_ANIMFILTER_SUBCHANNELS;
 
@@ -3148,7 +3157,8 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac,
 
   /* If filtering for channel drawing, we want the objects in alphabetical order,
    * to make it easier to predict where items are in the hierarchy
-   * - This order only really matters if we need to show all channels in the list (e.g. for drawing)
+   * - This order only really matters
+   *   if we need to show all channels in the list (e.g. for drawing).
    *   (XXX: What about lingering "active" flags? The order may now become unpredictable)
    * - Don't do this if this behavior has been turned off (i.e. due to it being too slow)
    * - Don't do this if there's just a single object
@@ -3320,7 +3330,8 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data)
 
     /* check if hash has any record of an entry like this
      * - just use ale->data for now, though it would be nicer to involve
-     *   ale->type in combination too to capture corner cases (where same data performs differently)
+     *   ale->type in combination too to capture corner cases
+     *   (where same data performs differently)
      */
     if (BLI_gset_add(gs, ale->data)) {
       /* this entry is 'unique' and can be kept */
@@ -3439,7 +3450,8 @@ size_t ANIM_animdata_filter(bAnimContext *ac,
         break;
       }
 
-      /* Timeline Mode - Basically the same as dopesheet, except we only have the summary for now */
+      /* Timeline Mode - Basically the same as dopesheet,
+       * except we only have the summary for now */
       case ANIMCONT_TIMELINE: {
         /* the DopeSheet editor is the primary place where the DopeSheet summaries are useful */
         if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items)) {
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 815d4c5f3af..884a8c20b19 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -240,7 +240,8 @@ static short ob_keyframes_loop(KeyframeEditData *ked,
   filter = ANIMFILTER_DATA_VISIBLE;  // curves only
   ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
 
-  /* loop through each F-Curve, applying the operation as required, but stopping on

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list