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

Campbell Barton noreply at git.blender.org
Sun Apr 21 22:35:05 CEST 2019


Commit: 0ac990d088d553c27f5360f62e142e99f087890a
Author: Campbell Barton
Date:   Mon Apr 22 00:18:34 2019 +1000
Branches: master
https://developer.blender.org/rB0ac990d088d553c27f5360f62e142e99f087890a

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_deps.c
M	source/blender/editors/animation/anim_draw.c
M	source/blender/editors/animation/anim_filter.c
M	source/blender/editors/animation/anim_ipo_utils.c
M	source/blender/editors/animation/anim_markers.c
M	source/blender/editors/animation/anim_motion_paths.c
M	source/blender/editors/animation/drivers.c
M	source/blender/editors/animation/fmodifier_ui.c
M	source/blender/editors/animation/keyframes_draw.c
M	source/blender/editors/animation/keyframes_edit.c
M	source/blender/editors/animation/keyframes_general.c
M	source/blender/editors/animation/keyframing.c
M	source/blender/editors/animation/keyingsets.c
M	source/blender/editors/armature/armature_add.c
M	source/blender/editors/armature/armature_edit.c
M	source/blender/editors/armature/armature_naming.c
M	source/blender/editors/armature/armature_ops.c
M	source/blender/editors/armature/armature_relations.c
M	source/blender/editors/armature/armature_skinning.c
M	source/blender/editors/armature/armature_utils.c
M	source/blender/editors/armature/pose_edit.c
M	source/blender/editors/armature/pose_lib.c
M	source/blender/editors/armature/pose_slide.c
M	source/blender/editors/armature/pose_transform.c
M	source/blender/editors/curve/editcurve.c
M	source/blender/editors/gizmo_library/gizmo_geometry.h
M	source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c
M	source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c
M	source/blender/editors/gpencil/annotate_draw.c
M	source/blender/editors/gpencil/annotate_paint.c
M	source/blender/editors/gpencil/drawgpencil.c
M	source/blender/editors/gpencil/editaction_gpencil.c
M	source/blender/editors/gpencil/gpencil_add_stroke.c
M	source/blender/editors/gpencil/gpencil_brush.c
M	source/blender/editors/gpencil/gpencil_convert.c
M	source/blender/editors/gpencil/gpencil_data.c
M	source/blender/editors/gpencil/gpencil_edit.c
M	source/blender/editors/gpencil/gpencil_fill.c
M	source/blender/editors/gpencil/gpencil_paint.c
M	source/blender/editors/gpencil/gpencil_select.c
M	source/blender/editors/gpencil/gpencil_undo.c
M	source/blender/editors/gpencil/gpencil_utils.c
M	source/blender/editors/include/ED_keyframing.h
M	source/blender/editors/include/ED_mesh.h
M	source/blender/editors/include/ED_numinput.h
M	source/blender/editors/include/UI_resources.h
M	source/blender/editors/mesh/editmesh_add_gizmo.c
M	source/blender/editors/mesh/editmesh_bevel.c
M	source/blender/editors/mesh/editmesh_knife.c
M	source/blender/editors/mesh/editmesh_rip.c
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/mesh/editmesh_undo.c
M	source/blender/editors/mesh/editmesh_utils.c
M	source/blender/editors/mesh/mesh_data.c
M	source/blender/editors/mesh/meshtools.c
M	source/blender/editors/object/object_add.c
M	source/blender/editors/object/object_constraint.c
M	source/blender/editors/object/object_gpencil_modifier.c
M	source/blender/editors/object/object_modifier.c
M	source/blender/editors/object/object_relations.c
M	source/blender/editors/object/object_select.c
M	source/blender/editors/object/object_shader_fx.c
M	source/blender/editors/object/object_transform.c
M	source/blender/editors/object/object_vgroup.c
M	source/blender/editors/physics/particle_edit.c
M	source/blender/editors/physics/particle_object.c
M	source/blender/editors/physics/physics_fluid.c
M	source/blender/editors/render/render_preview.c
M	source/blender/editors/screen/area.c
M	source/blender/editors/screen/glutil.c
M	source/blender/editors/screen/screen_context.c
M	source/blender/editors/screen/screen_draw.c
M	source/blender/editors/screen/screen_geometry.c
M	source/blender/editors/screen/screen_ops.c
M	source/blender/editors/screen/workspace_edit.c
M	source/blender/editors/sculpt_paint/paint_cursor.c
M	source/blender/editors/sculpt_paint/paint_image.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/editors/sculpt_paint/paint_mask.c
M	source/blender/editors/sculpt_paint/paint_vertex.c
M	source/blender/editors/sculpt_paint/paint_vertex_color_ops.c
M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/sculpt_paint/sculpt_intern.h
M	source/blender/editors/sculpt_paint/sculpt_uv.c
M	source/blender/editors/space_action/action_data.c
M	source/blender/editors/space_action/action_edit.c
M	source/blender/editors/space_action/action_ops.c
M	source/blender/editors/space_action/action_select.c
M	source/blender/editors/space_action/space_action.c
M	source/blender/editors/space_file/file_draw.c
M	source/blender/editors/space_file/file_ops.c
M	source/blender/editors/space_file/filelist.c
M	source/blender/editors/space_file/filesel.c
M	source/blender/editors/space_file/fsmenu.c
M	source/blender/editors/space_graph/graph_buttons.c
M	source/blender/editors/space_graph/graph_draw.c
M	source/blender/editors/space_graph/graph_edit.c
M	source/blender/editors/space_graph/graph_ops.c
M	source/blender/editors/space_graph/graph_select.c
M	source/blender/editors/space_graph/graph_utils.c
M	source/blender/editors/space_graph/space_graph.c
M	source/blender/editors/space_image/image_ops.c
M	source/blender/editors/space_nla/nla_buttons.c
M	source/blender/editors/space_nla/nla_channels.c
M	source/blender/editors/space_nla/nla_edit.c
M	source/blender/editors/space_nla/nla_ops.c
M	source/blender/editors/space_nla/nla_select.c
M	source/blender/editors/space_node/node_add.c
M	source/blender/editors/space_node/node_edit.c
M	source/blender/editors/space_node/node_intern.h
M	source/blender/editors/space_node/node_relationships.c
M	source/blender/editors/space_outliner/outliner_collections.c
M	source/blender/editors/space_outliner/outliner_dragdrop.c
M	source/blender/editors/space_outliner/outliner_draw.c
M	source/blender/editors/space_outliner/outliner_edit.c
M	source/blender/editors/space_outliner/outliner_select.c
M	source/blender/editors/space_outliner/outliner_tools.c
M	source/blender/editors/space_outliner/outliner_tree.c
M	source/blender/editors/space_script/space_script.c
M	source/blender/editors/space_sequencer/sequencer_draw.c
M	source/blender/editors/space_sequencer/sequencer_edit.c
M	source/blender/editors/space_text/text_autocomplete.c
M	source/blender/editors/space_view3d/view3d_buttons.c
M	source/blender/editors/space_view3d/view3d_camera_control.c
M	source/blender/editors/space_view3d/view3d_draw.c
M	source/blender/editors/space_view3d/view3d_draw_legacy.c
M	source/blender/editors/space_view3d/view3d_edit.c
M	source/blender/editors/space_view3d/view3d_project.c
M	source/blender/editors/space_view3d/view3d_snap.c
M	source/blender/editors/space_view3d/view3d_utils.c
M	source/blender/editors/space_view3d/view3d_view.c
M	source/blender/editors/undo/memfile_undo.c
M	source/blender/editors/util/numinput.c
M	source/blender/editors/util/select_utils.c
M	source/blender/editors/uvedit/uvedit_ops.c
M	source/blender/editors/uvedit/uvedit_smart_stitch.c
M	source/blender/editors/uvedit/uvedit_unwrap_ops.c

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

diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 225bad1b35b..a17ee820595 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -356,7 +356,8 @@ static short acf_generic_group_offset(bAnimContext *ac, bAnimListElem *ale)
     else if (ELEM(GS(ale->id->name), ID_MA, ID_PA))
       offset += (short)(0.7f * U.widget_unit);
 
-    /* if not in Action Editor mode, action-groups (and their children) must carry some offset too... */
+    /* If not in Action Editor mode, action-groups (and their children)
+     * must carry some offset too. */
     else if (ac->datatype != ANIMCONT_ACTION)
       offset += (short)(0.7f * U.widget_unit);
 
@@ -3855,7 +3856,8 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne
   return -1;
 }
 
-/* quick macro for use in ANIM_channel_setting_set - set flag for setting according the mode given */
+/* Quick macro for use in ANIM_channel_setting_set -
+ * set flag for setting according the mode given. */
 #define ACF_SETTING_SET(sval, sflag, smode) \
   { \
     if (negflag) { \
@@ -4022,8 +4024,8 @@ void ANIM_channel_draw(
 
         immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
-        /* F-Curve channels need to have a special 'color code' box drawn, which is colored with whatever
-         * color the curve has stored
+        /* F-Curve channels need to have a special 'color code' box drawn,
+         * which is colored with whatever color the curve has stored.
          */
         immUniformColor3fv(fcu->color);
 
@@ -4143,26 +4145,29 @@ void ANIM_channel_draw(
       if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PINNED))
         offset += ICON_WIDTH;
 
-      /* NOTE: technically, NLA Action "pushdown" should be here too, but there are no sliders there */
+      /* NOTE: technically, NLA Action "pushdown" should be here too,
+       * but there are no sliders there. */
 
       /* NLA action channels have slightly different spacing requirements... */
       if (ale->type == ANIMTYPE_NLAACTION)
         ymin_ofs = NLACHANNEL_SKIP;
     }
 
-    /* draw slider
-     * - even if we can draw sliders for this view, we must also check that the channel-type supports them
-     *   (only only F-Curves really can support them for now)
-     * - slider should start before the toggles (if they're visible) to keep a clean line down the side
+    /* Draw slider:
+     * - Even if we can draw sliders for this view,
+     *   we must also check that the channel-type supports them
+     *   (only only F-Curves really can support them for now).
+     * - Slider should start before the toggles (if they're visible)
+     *   to keep a clean line down the side.
      */
     if ((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY)) {
       /* adjust offset */
       offset += SLIDER_WIDTH;
     }
 
-    /* finally draw a backdrop rect behind these
-     * - starts from the point where the first toggle/slider starts,
-     * - ends past the space that might be reserved for a scroller
+    /* Finally draw a backdrop rect behind these:
+     * - Starts from the point where the first toggle/slider starts.
+     * - Ends past the space that might be reserved for a scroller.
      */
     immRectf(pos,
              v2d->cur.xmax - (float)offset,
@@ -4402,7 +4407,8 @@ static void achannel_setting_slider_nla_curve_cb(bContext *C,
   /* get flags for keyframing */
   flag = ANIM_get_keyframing_flags(scene, 1);
 
-  /* get pointer and property from the slider - this should all match up with the NlaStrip required... */
+  /* Get pointer and property from the slider -
+   * this should all match up with the NlaStrip required. */
   UI_context_active_but_prop_get(C, &ptr, &prop, &index);
 
   if (fcu && prop) {
@@ -4853,7 +4859,8 @@ void ANIM_channel_draw_widgets(const bContext *C,
         draw_setting_widget(ac, ale, acf, block, offset, ymid, ACHANNEL_SETTING_MUTE);
       }
       if (ale->type == ANIMTYPE_GPLAYER) {
-        /* Not technically "mute" (in terms of anim channels, but this sets layer visibility instead) */
+        /* Not technically "mute"
+         * (in terms of anim channels, but this sets layer visibility instead). */
         offset -= ICON_WIDTH;
         draw_setting_widget(ac, ale, acf, block, offset, ymid, ACHANNEL_SETTING_VISIBLE);
       }
@@ -4900,17 +4907,20 @@ void ANIM_channel_draw_widgets(const bContext *C,
       }
     }
 
-    /* draw slider
-     * - even if we can draw sliders for this view, we must also check that the channel-type supports them
-     *   (only only F-Curves really can support them for now)
-     * - to make things easier, we use RNA-autobuts for this so that changes are reflected immediately,
-     *   wherever they occurred. BUT, we don't use the layout engine, otherwise we'd get wrong alignment,
-     *   and wouldn't be able to auto-keyframe...
-     * - slider should start before the toggles (if they're visible) to keep a clean line down the side
+    /* Draw slider:
+     * - Even if we can draw sliders for this view, we must also check that the channel-type
+     *   supports them (only only F-Curves really can support them for now).
+     * - To make things easier, we use RNA-autobuts for this so that changes are
+     *   reflected immediately, wherever they occurred.
+     *   BUT, we don't use the layout engine, otherwise we'd get wrong alignment,
+     *   and wouldn't be able to auto-keyframe.
+     * - Slider should start before the toggles (if they're visible)
+     *   to keep a clean line down the side.
      */
     if ((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY)) {
       /* adjust offset */
-      // TODO: make slider width dynamic, so that they can be easier to use when the view is wide enough
+      /* TODO: make slider width dynamic,
+       * so that they can be easier to use when the view is wide enough. */
       offset -= SLIDER_WIDTH;
 
       /* need backdrop behind sliders... */
@@ -4931,7 +4941,8 @@ void ANIM_channel_draw_widgets(const bContext *C,
           if (prop) {
             uiBut *but;
 
-            /* create the slider button, and assign relevant callback to ensure keyframes are inserted... */
+            /* Create the slider button,
+             * and assign relevant callback to ensure keyframes are inserted. */
             but = uiDefAutoButR(block,
                                 &ptr,
                                 prop,
@@ -4977,7 +4988,8 @@ void ANIM_channel_draw_widgets(const bContext *C,
           if (RNA_path_resolve_property(&id_ptr, rna_path, &ptr, &prop)) {
             uiBut *but;
 
-            /* create the slider button, and assign relevant callback to ensure keyframes are inserted... */
+            /* Create the slider button,
+             * and assign relevant callback to ensure keyframes are inserted. */
             but = uiDefAutoButR(block,
                                 &ptr,
                                 prop,
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 67ec5a95913..d85457bbc4f 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -501,7 +501,8 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac,
    */
   if (((setting == ACHANNEL_SETTING_VISIBLE) && (mode != ACHANNEL_SETFLAG_CLEAR)) ||
       ((setting != ACHANNEL_SETTING_VISIBLE) && (mode == ACHANNEL_SETFLAG_CLEAR))) {
-    /* go backwards in the list, until the highest-ranking element (by indention has been covered) */
+    /* Go backwards in the list, until the highest-ranking element
+     * (by indention has been covered). */
     for (ale = match->prev; ale; ale = ale->prev) {
       const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
       int level;
@@ -517,8 +518,8 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac,
 
       /* if the level is 'less than' (i.e. more important) the level we're matching
        * but also 'less than' the level just tried (i.e. only the 1st group above grouped F-Curves,
-       * when toggling visibility of F-Curves, gets flushed, which should happen if we don't let prevLevel
-       * get updated below once the first 1st group is found)...
+       * when toggling visibility of F-Curves, gets flushed, which should happen if we don't let
+       * prevLevel get updated below once the first 1st group is found).
        */
       if (level < prevLevel) {
         /* flush the new status... */
@@ -907,7 +908,8 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands,
       (island == NULL) ||
       /* 2) unselected islands have single channels only - to allow up/down movement */
       ((island->flag & REORDER_ISLAND_SELECTED) == 0) ||
-      /* 3) if channel is unselected, stop existing island (it was either wrong sel status, or full already) */
+      /* 3) if channel is unselected, stop existing island
+       * (it was either wrong sel status, or full already) */
       (is_sel == 0) ||
       /* 4) hidden status changes */
       ((island->flag & REORDER_ISLAND_HIDDEN) != is_hidden)) {
@@ -997,9 +999,12 @@ static bool rearrange_animchannel_islands(ListBase *list,
     rearrange_animchannel_add_to_islands(&islands, list, channel, type, is_hidden);
   }
 
-  /* perform moving of selected islands now, but only if there is more than one of 'em so that something will happen
-   * - scanning of the list is performed in the opposite direction to the direction we're moving things, so that we
-   *   shouldn't need to encounter items we've moved already
+  /* Perform moving of selected islands now, but only if there is more than one of them
+   * so that something will happen:
+   *
+   * - Scanning of the list is performed in the opposite direction
+   *   to the direction we're moving things,
+   *   so that we shouldn't need to encounter items we've moved already.
    */
   if (islands.first != islands.last) {
     tReorderChannelIsland *fir

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list