[Bf-blender-cvs] [b8e8c0e325d] master: Cleanup: comment line length (editors)

Campbell Barton noreply at git.blender.org
Tue Jan 15 13:32:58 CET 2019


Commit: b8e8c0e325d213f2dcf4adad5506989fa224716e
Author: Campbell Barton
Date:   Tue Jan 15 23:24:20 2019 +1100
Branches: master
https://developer.blender.org/rBb8e8c0e325d213f2dcf4adad5506989fa224716e

Cleanup: comment line length (editors)

Prevents clang-format wrapping text before comments.

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

M	source/blender/editors/animation/anim_channels_defines.c
M	source/blender/editors/animation/anim_channels_edit.c
M	source/blender/editors/animation/anim_draw.c
M	source/blender/editors/animation/anim_filter.c
M	source/blender/editors/animation/anim_markers.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/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_relations.c
M	source/blender/editors/armature/armature_utils.c
M	source/blender/editors/armature/meshlaplacian.c
M	source/blender/editors/armature/pose_lib.c
M	source/blender/editors/armature/pose_select.c
M	source/blender/editors/armature/pose_slide.c
M	source/blender/editors/armature/pose_transform.c
M	source/blender/editors/armature/pose_utils.c
M	source/blender/editors/curve/editcurve.c
M	source/blender/editors/curve/editcurve_add.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/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_intern.h
M	source/blender/editors/gpencil/gpencil_interpolate.c
M	source/blender/editors/gpencil/gpencil_paint.c
M	source/blender/editors/gpencil/gpencil_select.c
M	source/blender/editors/gpencil/gpencil_utils.c
M	source/blender/editors/include/ED_anim_api.h
M	source/blender/editors/include/ED_armature.h
M	source/blender/editors/include/ED_fileselect.h
M	source/blender/editors/include/ED_keyframes_draw.h
M	source/blender/editors/include/ED_keyframes_edit.h
M	source/blender/editors/include/ED_keyframing.h
M	source/blender/editors/include/ED_numinput.h
M	source/blender/editors/include/ED_object.h
M	source/blender/editors/include/ED_screen_types.h
M	source/blender/editors/include/ED_transverts.h
M	source/blender/editors/include/ED_view3d.h
M	source/blender/editors/include/UI_interface.h
M	source/blender/editors/interface/interface.c
M	source/blender/editors/interface/interface_align.c
M	source/blender/editors/interface/interface_anim.c
M	source/blender/editors/interface/interface_context_menu.c
M	source/blender/editors/interface/interface_draw.c
M	source/blender/editors/interface/interface_eyedropper_datablock.c
M	source/blender/editors/interface/interface_handlers.c
M	source/blender/editors/interface/interface_icons.c
M	source/blender/editors/interface/interface_intern.h
M	source/blender/editors/interface/interface_layout.c
M	source/blender/editors/interface/interface_ops.c
M	source/blender/editors/interface/interface_panel.c
M	source/blender/editors/interface/interface_region_color_picker.c
M	source/blender/editors/interface/interface_region_menu_pie.c
M	source/blender/editors/interface/interface_region_menu_popup.c
M	source/blender/editors/interface/interface_region_popover.c
M	source/blender/editors/interface/interface_region_search.c
M	source/blender/editors/interface/interface_style.c
M	source/blender/editors/interface/interface_templates.c
M	source/blender/editors/interface/interface_utils.c
M	source/blender/editors/interface/interface_widgets.c
M	source/blender/editors/interface/resources.c
M	source/blender/editors/interface/view2d.c
M	source/blender/editors/interface/view2d_ops.c
M	source/blender/editors/lattice/editlattice_tools.c
M	source/blender/editors/mask/mask_draw.c
M	source/blender/editors/mask/mask_ops.c
M	source/blender/editors/mesh/editface.c
M	source/blender/editors/mesh/editmesh_add.c
M	source/blender/editors/mesh/editmesh_bevel.c
M	source/blender/editors/mesh/editmesh_inset.c
M	source/blender/editors/mesh/editmesh_intersect.c
M	source/blender/editors/mesh/editmesh_knife.c
M	source/blender/editors/mesh/editmesh_loopcut.c
M	source/blender/editors/mesh/editmesh_path.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/mesh/editmesh_utils.c
M	source/blender/editors/mesh/mesh_mirror.c
M	source/blender/editors/mesh/meshtools.c
M	source/blender/editors/object/object_add.c
M	source/blender/editors/object/object_bake.c
M	source/blender/editors/object/object_bake_api.c
M	source/blender/editors/object/object_collection.c
M	source/blender/editors/object/object_constraint.c
M	source/blender/editors/object/object_data_transfer.c
M	source/blender/editors/object/object_edit.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_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/render/render_internal.c
M	source/blender/editors/render/render_opengl.c
M	source/blender/editors/render/render_shading.c
M	source/blender/editors/screen/screen_context.c
M	source/blender/editors/screen/screen_ops.c
M	source/blender/editors/screen/screendump.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_2d.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_stroke.c
M	source/blender/editors/sculpt_paint/paint_vertex.c
M	source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/sculpt_paint/sculpt_uv.c
M	source/blender/editors/sound/sound_ops.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_select.c
M	source/blender/editors/space_action/space_action.c
M	source/blender/editors/space_buttons/buttons_context.c
M	source/blender/editors/space_buttons/space_buttons.c
M	source/blender/editors/space_clip/clip_buttons.c
M	source/blender/editors/space_clip/clip_dopesheet_draw.c
M	source/blender/editors/space_clip/clip_draw.c
M	source/blender/editors/space_clip/clip_graph_ops.c
M	source/blender/editors/space_clip/space_clip.c
M	source/blender/editors/space_console/console_intern.h
M	source/blender/editors/space_console/console_ops.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/space_graph.c
M	source/blender/editors/space_image/image_buttons.c
M	source/blender/editors/space_image/image_ops.c
M	source/blender/editors/space_image/space_image.c
M	source/blender/editors/space_info/textview.c
M	source/blender/editors/space_info/textview.h
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_draw.c
M	source/blender/editors/space_nla/nla_edit.c
M	source/blender/editors/space_nla/nla_select.c
M	source/blender/editors/space_node/drawnode.c
M	source/blender/editors/space_node/node_draw.c
M	source/blender/editors/space_node/node_edit.c
M	source/blender/editors/space_node/node_group.c
M	source/blender/editors/space_node/node_intern.h
M	source/blender/editors/space_node/node_relationships.c
M	source/blender/editors/space_node/node_templates.c
M	source/blender/editors/space_node/space_node.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_intern.h
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_outliner/outliner_utils.c
M	source/blender/editors/space_sequencer/sequencer_add.c
M	source/blender/editors/space_sequencer/sequencer_draw.c
M	source/blender/editors/space_sequencer/sequencer_edit.c
M	source/blender/editors/space_sequencer/sequencer_select.c
M	source/blender/editors/space_text/text_autocomplete.c
M	source/blender/editors/space_text/text_draw.c
M	source/blender/editors/space_text/text_format.h
M	source/blender/editors/space_text/text_ops.c
M	source/blender/editors/space_userpref/space_userpref.c
M	source/blender/editors/space_view3d/drawobject.c
M	source/blender/editors/space_view3d/space_view3d.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_fly.c
M	source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
M	source/blender/editors/space_view3d/view3d_project.c
M	source/blender/editors/space_view3d/view3d_select.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/space_view3d/view3d_walk.c
M	source/blender/editors/transform/transform.c
M	source/blender/editors/transform/transform_conversions.c
M	source/blender/editors/transform/transform_generics.c
M	source/blender/editors/transform/transform_gizmo_3d.c
M	source/blender/editors/transform/transform_input.c
M	source/blender/editors/transform/transform_ops.c
M	source/blender/editors/transform/transform_snap.c
M	source/blender/editors/transform/transform_snap_object.c
M	source/blender/editors/util/ed_util.c
M	source/blender/editors/util/numinput.c
M	source/blender/editors/uvedit/uvedit_buttons.c
M	source/blender/editors/uvedit/uvedit_draw.c
M	source/blender/editors/uvedit/uvedit_ops.c
M	source/blender/editors/uvedit/uvedit_parametrizer.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 e7416b94abf..8f052b4c19a 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -3531,7 +3531,8 @@ static bAnimChannelType ACF_NLAACTION =
 	"NLA Active Action",            /* type name */
 	ACHANNEL_ROLE_CHANNEL,          /* role */
 
-	acf_nlaaction_color,            /* backdrop color (NOTE: the backdrop handles this too, since it needs special hacks) */
+	acf_nlaaction_color,            /* backdrop color (NOTE: the backdrop handles this too,
+	                                 * since it needs special hacks) */
 	acf_nlaaction_backdrop,         /* backdrop */
 	acf_generic_indention_flexible, /* indent level */
 	acf_generic_group_offset,       /* offset */           // XXX?
@@ -4413,7 +4414,8 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
 					break;
 
 				/* no flushing */
-				case ACHANNEL_SETTING_EXPAND: /* expanding - cannot flush, otherwise all would open/close at once */
+				case ACHANNEL_SETTING_EXPAND: /* expanding - cannot flush,
+				                               * otherwise all would open/close at once */
 				default:
 					UI_but_func_set(but, achannel_setting_widget_cb, NULL, NULL);
 					break;
@@ -4601,7 +4603,8 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
 
 			/* modifiers disable */
 			if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MOD_OFF)) {
-				offset += ICON_WIDTH * 1.2f; /* hack: extra spacing, to avoid touching the mute toggle */
+				/* hack: extra spacing, to avoid touching the mute toggle */
+				offset += ICON_WIDTH * 1.2f;
 				draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax - offset, ymid, ACHANNEL_SETTING_MOD_OFF);
 			}
 
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index b232c23b0a5..af730036c9f 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -881,7 +881,8 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands, ListBase *sr
                                                  Link *channel, eAnim_ChannelType type,
                                                  const bool is_hidden)
 {
-	tReorderChannelIsland *island = islands->last;  /* always try to add to last island if possible */
+	/* always try to add to last island if possible */
+	tReorderChannelIsland *island = islands->last;
 	bool is_sel = false, is_untouchable = false;
 
 	/* get flags - selected and untouchable from the channel */
@@ -1561,7 +1562,8 @@ static void ANIM_OT_channels_group(wmOperatorType *ot)
 	ot->prop = RNA_def_string(ot->srna, "name", "New Group",
 	                          sizeof(((bActionGroup *)NULL)->name),
 	                          "Name", "Name of newly created group");
-	/* RNA_def_property_flag(ot->prop, PROP_SKIP_SAVE); */ /* XXX: still not too sure about this - keeping same text is confusing... */
+	/* XXX: still not too sure about this - keeping same text is confusing... */
+	// RNA_def_property_flag(ot->prop, PROP_SKIP_SAVE);
 }
 
 /* ----------------------------------------------------------- */
@@ -2948,7 +2950,8 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
 				BKE_gpencil_layer_setactive(gpd, gpl);
 			}
 
-			WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL); /* Grease Pencil updates */
+			/* Grease Pencil updates */
+			WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
 			notifierFlags |= (ND_ANIMCHAN | NA_EDITED); /* Animation Editors updates */
 			break;
 		}
@@ -3018,17 +3021,24 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, const wmE
 	v2d = &ar->v2d;
 
 	/* select mode is either replace (deselect all, then add) or add/extend */
-	if (RNA_boolean_get(op->ptr, "extend"))
+	if (RNA_boolean_get(op->ptr, "extend")) {
 		selectmode = SELECT_INVERT;
-	else if (RNA_boolean_get(op->ptr, "children_only"))
-		selectmode = -1;  /* this is a bit of a special case for ActionGroups only... should it be removed or extended to all instead? */
-	else
+	}
+	else if (RNA_boolean_get(op->ptr, "children_only")) {
+		/* this is a bit of a special case for ActionGroups only...
+		 * should it be removed or extended to all instead? */
+		selectmode = -1;
+	}
+	else {
 		selectmode = SELECT_REPLACE;
+	}
 
 	/* figure out which channel user clicked in
-	 * Note: although channels technically start at (y = ACHANNEL_FIRST), we need to adjust by half a channel's height
-	 *       so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use
-	 *       ACHANNEL_HEIGHT_HALF.
+	 *
+	 * Note:
+	 * although channels technically start at (y = ACHANNEL_FIRST),
+	 * we need to adjust by half a channel's height so that the tops of channels get caught ok.
+	 * Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use ACHANNEL_HEIGHT_HALF.
 	 */
 	UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, &y);
 	UI_view2d_listview_view_to_cell(v2d, ACHANNEL_NAMEWIDTH, ACHANNEL_STEP(&ac), 0, (float)ACHANNEL_HEIGHT_HALF(&ac), x, y, NULL, &channel_index);
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 239ab5f8206..27584c5e522 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -175,7 +175,8 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width)
 
 		immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 		immUniformThemeColorShadeAlpha(TH_ANIM_PREVIEW_RANGE, -25, -30);
-		//immUniformColor4f(0.8f, 0.44f, 0.1f, 0.2f); /* XXX: Fix this hardcoded color (anim_active) */
+		/* XXX: Fix this hardcoded color (anim_active) */
+		//immUniformColor4f(0.8f, 0.44f, 0.1f, 0.2f);
 
 		/* only draw two separate 'curtains' if there's no overlap between them */
 		if (PSFRA < PEFRA + end_frame_width) {
@@ -285,7 +286,8 @@ static short bezt_nlamapping_restore(KeyframeEditData *ked, BezTriple *bezt)
 	return 0;
 }
 
-/* helper function for ANIM_nla_mapping_apply_fcurve() -> "apply", i.e. mapping points to NLA-mapped global time */
+/* helper function for ANIM_nla_mapping_apply_fcurve() -> "apply",
+ * i.e. mapping points to NLA-mapped global time */
 static short bezt_nlamapping_apply(KeyframeEditData *ked, BezTriple *bezt)
 {
 	/* AnimData block providing scaling is stored in 'data', only_keys option is stored in i1 */
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index d066d132529..db887dbfeb1 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -908,7 +908,8 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
 				break;
 			}
 			case ANIMTYPE_FCURVE:
-			case ANIMTYPE_NLACURVE: /* practically the same as ANIMTYPE_FCURVE. Differences are applied post-creation */
+			case ANIMTYPE_NLACURVE: /* practically the same as ANIMTYPE_FCURVE.
+			                         * Differences are applied post-creation */
 			{
 				FCurve *fcu = (FCurve *)data;
 
@@ -1001,7 +1002,8 @@ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id
 	if (fcu->grp != NULL && fcu->grp->flag & ADT_CURVES_ALWAYS_VISIBLE) {
 		return false;
 	}
-	/* hidden items should be skipped if we only care about visible data, but we aren't interested in hidden stuff */
+	/* hidden items should be skipped if we only care about visible data,
+	 * but we aren't interested in hidden stuff */
 	const bool skip_hidden = (filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN);
 
 	if (GS(owner_id->name) == ID_OB) {
@@ -1266,7 +1268,8 @@ static size_t animfilter_fcurves(ListBase *anim_data, bDopeSheet *ads,
 	 */
 	for (fcu = first; ( (fcu = animfilter_fcurve_next(ads, fcu, fcurve_type, filter_mode, owner, owner_id)) ); fcu = fcu->next) {
 		if (UNLIKELY(fcurve_type == ANIMTYPE_NLACURVE)) {
-			/* NLA Control Curve - Basically the same as normal F-Curves, except we need to set some stuff differently */
+			/* NLA Control Curve - Basically the same as normal F-Curves,
+			 * except we need to set some stuff differently */
 			ANIMCHANNEL_NEW_CHANNEL_FULL(fcu, ANIMTYPE_NLACURVE, owner_id, fcurve_owner_id, {
 				ale->owner = owner; /* strip */
 				ale->adt = NULL;    /* to prevent time mapping from causing problems */
@@ -1295,8 +1298,11 @@ static size_t animfilter_act_group(bAnimContext *ac, ListBase *anim_data, bDopeS
 	 *     - Hierarchy matters: this hack should be applied
 	 *     - Hierarchy ignored: cases like [#21276] won't work properly, unless we skip this hack
 	 */
-	if ( ((filter_mode & ANIMFILTER_LIST_VISIBLE) && EXPANDED_AGRP(ac, agrp) == 0) &&     /* care about hierarchy but group isn't expanded */
-	     (filter_mode & (ANIMFILTER_SEL | ANIMFILTER_UNSEL)) )                          /* care about selection status */
+	if (
+	        /* care about hierarchy but group isn't expanded */
+	        ((filter_mode & ANIMFILTER_LIST_VISIBLE) && EXPANDED_AGRP(ac, agrp) == 0) &&
+	        /* care about selection status */
+	        (filter_mode & (ANIMFILTER_SEL | ANIMFILTER_UNSEL)) )
 	{
 		/* if the group itself isn't selected appropriately, we shouldn't consider it's children either */
 		if (ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) == 0)
@@ -1318,9 +1324,9 @@ static size_t animfilter_act_group(bAnimContext *ac, ListBase *anim_data, bDopeS
 	{
 		/* special filter so that we can get just the F-Curves within the active group */
 		if (!(filter_mode & ANIMFILTER_ACTGROUPED) || (agrp->flag & AGRP_ACTIVE)) {
-			/* for the Graph Editor, curves may be set to not be visible in the view to lessen clutter,
-			 * but to do this, we need to check that the group doesn't have it's not-visible flag set preventing
-			 * all its sub-curves to be shown
+			/* for the Graph Editor, curves may be 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list