From 0ac990d088d553c27f5360f62e142e99f087890a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 22 Apr 2019 00:18:34 +1000 Subject: Cleanup: comments (long lines) in editors --- source/blender/editors/space_nla/nla_buttons.c | 12 +++++++----- source/blender/editors/space_nla/nla_channels.c | 15 +++++++++------ source/blender/editors/space_nla/nla_edit.c | 11 +++++++++-- source/blender/editors/space_nla/nla_ops.c | 7 ++++--- source/blender/editors/space_nla/nla_select.c | 25 +++++++++++++++---------- 5 files changed, 44 insertions(+), 26 deletions(-) (limited to 'source/blender/editors/space_nla') diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index fb657a31d34..18c31d3a7f7 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -81,9 +81,9 @@ bool nla_panel_context(const bContext *C, short found = 0; /* not bool, since we need to indicate "found but not ideal" status */ int filter; - /* for now, only draw if we could init the anim-context info (necessary for all animation-related tools) - * to work correctly is able to be correctly retrieved. There's no point showing empty panels? - */ + /* For now, only draw if we could init the anim-context info + * (necessary for all animation-related tools) + * to work correctly is able to be correctly retrieved. There's no point showing empty panels? */ if (ANIM_animdata_get_context(C, &ac) == 0) return false; @@ -416,7 +416,8 @@ static void nla_panel_actclip(const bContext *C, Panel *pa) uiItemR(column, &strip_ptr, "action_frame_start", 0, IFACE_("Start Frame"), ICON_NONE); uiItemR(column, &strip_ptr, "action_frame_end", 0, IFACE_("End Frame"), ICON_NONE); - // XXX: this layout may actually be too abstract and confusing, and may be better using standard column layout + /* XXX: this layout may actually be too abstract and confusing, + * and may be better using standard column layout. */ row = uiLayoutRow(layout, false); uiItemR(row, &strip_ptr, "use_sync_length", 0, IFACE_("Sync Length"), ICON_NONE); uiItemO(row, IFACE_("Now"), ICON_FILE_REFRESH, "NLA_OT_action_sync_length"); @@ -483,7 +484,8 @@ static void nla_panel_modifiers(const bContext *C, Panel *pa) row = uiLayoutRow(pa->layout, false); block = uiLayoutGetBlock(row); - // FIXME: we need to set the only-active property so that this will only add modifiers for the active strip (not all selected) + // FIXME: we need to set the only-active property so that this + // will only add modifiers for the active strip (not all selected). uiItemMenuEnumO( row, (bContext *)C, "NLA_OT_fmodifier_add", "type", IFACE_("Add Modifier"), ICON_NONE); diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 90e70b835f8..9332a6d6763 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -67,8 +67,9 @@ /* Depending on the channel that was clicked on, the mouse click will activate whichever * part of the channel is relevant. * - * NOTE: eventually, this should probably be phased out when many of these things are replaced with buttons - * --> Most channels are now selection only... + * NOTE: eventually, + * this should probably be phased out when many of these things are replaced with buttons + * --> Most channels are now selection only. */ static int mouse_nla_channels( @@ -369,10 +370,12 @@ static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, const wmEv else selectmode = SELECT_REPLACE; - /* figure out which channel user clicked in - * Note: although channels technically start at y= NLACHANNEL_FIRST, we need to adjust by half a channel's height - * so that the tops of channels get caught ok. Since NLACHANNEL_FIRST is really NLACHANNEL_HEIGHT, we simply use - * NLACHANNEL_HEIGHT_HALF. + /** + * Figure out which channel user clicked in: + * + * \note Although channels technically start at y= NLACHANNEL_FIRST, + * we need to adjust by half a channel's height so that the tops of channels get caught ok. + * Since NLACHANNEL_FIRST is really NLACHANNEL_HEIGHT, we simply use NLACHANNEL_HEIGHT_HALF. */ UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, &y); UI_view2d_listview_view_to_cell(v2d, diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 58db49d09af..99c2b7aa99c 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -1482,7 +1482,8 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op) /* make temporary metastrips so that entire islands of selections can be moved around */ BKE_nlastrips_make_metas(&nlt->strips, 1); - /* special case: if there is only 1 island (i.e. temp meta BUT NOT unselected/normal/normal-meta strips) left after this, + /* special case: if there is only 1 island + * (i.e. temp meta BUT NOT unselected/normal/normal-meta strips) left after this, * and this island has two strips inside it, then we should be able to just swap these still... */ if (BLI_listbase_is_empty(&nlt->strips) == false) { @@ -2471,7 +2472,13 @@ void NLA_OT_fmodifier_copy(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* id-props */ - //ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All F-Modifiers", "Copy all the F-Modifiers, instead of just the active one"); +#if 0 + ot->prop = RNA_def_boolean(ot->srna, + "all", + 1, + "All F-Modifiers", + "Copy all the F-Modifiers, instead of just the active one"); +#endif } /* ******************** Paste F-Modifiers Operator *********************** */ diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c index 2715c07164b..9c2eb541f52 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -167,9 +167,10 @@ void nla_keymap(wmKeyConfig *keyconf) WM_keymap_ensure(keyconf, "NLA Generic", SPACE_NLA, 0); /* channels ---------------------------------------------------------- */ - /* Channels are not directly handled by the NLA Editor module, but are inherited from the Animation module. - * Most of the relevant operations, keymaps, drawing, etc. can therefore all - * be found in that module instead, as there are many similarities with the other Animation Editors. + /* Channels are not directly handled by the NLA Editor module, but are inherited from the + * animation module. Most of the relevant operations, keymaps, drawing, etc. can therefore all + * be found in that module instead, as there are many similarities with the other + * animation editors. * * However, those operations which involve clicking on channels and/or * the placement of them in the view are implemented here instead diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 0df0c5a99da..c872ae3e182 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -139,7 +139,8 @@ static void deselect_nla_strips(bAnimContext *ac, short test, short sel) ACHANNEL_SET_FLAG(strip, smode, NLASTRIP_FLAG_SELECT); /* clear active flag */ - // TODO: for clear active, do we want to limit this to only doing this on a certain set of tracks though? + /* TODO: for clear active, + * do we want to limit this to only doing this on a certain set of tracks though? */ strip->flag &= ~NLASTRIP_FLAG_ACTIVE; } } @@ -203,11 +204,13 @@ void NLA_OT_select_all(wmOperatorType *ot) } /* ******************** Box Select Operator **************************** */ -/* This operator currently works in one of three ways: - * -> BKEY - 1) all strips within region are selected (NLAEDIT_BORDERSEL_ALLSTRIPS) - * -> ALT-BKEY - depending on which axis of the region was larger... - * -> 2) x-axis, so select all frames within frame range (NLAEDIT_BORDERSEL_FRAMERANGE) - * -> 3) y-axis, so select all frames within channels that region included (NLAEDIT_BORDERSEL_CHANNELS) +/** + * This operator currently works in one of three ways: + * - BKEY - 1: all strips within region are selected #NLAEDIT_BOX_ALLSTRIPS. + * - ALT-BKEY - depending on which axis of the region was larger. + * - 2: x-axis, so select all frames within frame range #NLAEDIT_BOXSEL_FRAMERANGE. + * - 3: y-axis, so select all frames within channels that region included + * #NLAEDIT_BOXSEL_CHANNELS. */ /* defines for box_select mode */ @@ -295,10 +298,12 @@ static int nlaedit_box_select_exec(bContext *C, wmOperator *op) /* selection 'mode' depends on whether box_select region only matters on one axis */ if (RNA_boolean_get(op->ptr, "axis_range")) { - /* mode depends on which axis of the range is larger to determine which axis to use - * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size - * - the frame-range select option is favored over the channel one (x over y), as frame-range one is often - * used for tweaking timing when "blocking", while channels is not that useful... + /* mode depends on which axis of the range is larger to determine which axis to use. + * - Checking this in region-space is fine, + * as it's fundamentally still going to be a different rect size. + * - The frame-range select option is favored over the channel one (x over y), + * as frame-range one is often. + * Used for tweaking timing when "blocking", while channels is not that useful. */ if (BLI_rcti_size_x(&rect) >= BLI_rcti_size_y(&rect)) mode = NLA_BOXSEL_FRAMERANGE; -- cgit v1.2.3