From d7f55c4ff58f87b80f0ce2fa43ce2f7cd2b72675 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 14 Nov 2018 12:53:15 +1100 Subject: Cleanup: comment block tabs --- source/blender/editors/space_nla/nla_buttons.c | 4 +-- source/blender/editors/space_nla/nla_channels.c | 6 ++-- source/blender/editors/space_nla/nla_draw.c | 44 ++++++++++++------------- source/blender/editors/space_nla/nla_edit.c | 20 +++++------ source/blender/editors/space_nla/nla_ops.c | 31 ++++++++--------- source/blender/editors/space_nla/nla_select.c | 28 ++++++++-------- 6 files changed, 67 insertions(+), 66 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 659a36c4a23..63eb0e361bf 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -95,7 +95,7 @@ bool nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA *nlt_p return false; /* extract list of active channel(s), of which we should only take the first one - * - we need the channels flag to get the active AnimData block when there are no NLA Tracks + * - we need the channels flag to get the active AnimData block when there are no NLA Tracks */ // XXX: double-check active! filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ACTIVE | ANIMFILTER_LIST_CHANNELS); @@ -366,7 +366,7 @@ static void nla_panel_properties(const bContext *C, Panel *pa) uiItemR(row, &strip_ptr, "blend_type", 0, NULL, ICON_NONE); /* blend in/out + autoblending - * - blend in/out can only be set when autoblending is off + * - blend in/out can only be set when autoblending is off */ column = uiLayoutColumn(layout, true); uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == false); diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index c1e4a5de0ed..103b0664a23 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -71,7 +71,7 @@ * 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... + * --> Most channels are now selection only... */ static int mouse_nla_channels(bContext *C, bAnimContext *ac, float x, int channel_index, short selectmode) @@ -368,8 +368,8 @@ static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, const wmEv /* 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. + * 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, NLACHANNEL_NAMEWIDTH, NLACHANNEL_STEP(snla), 0, (float)NLACHANNEL_HEIGHT_HALF(snla), x, y, NULL, &channel_index); diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 5d138a939de..ea35c583913 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -113,15 +113,15 @@ static void nla_action_draw_keyframes(AnimData *adt, bAction *act, View2D *v2d, return; /* draw a darkened region behind the strips - * - get and reset the background color, this time without the alpha to stand out better - * (amplified alpha is used instead) + * - get and reset the background color, this time without the alpha to stand out better + * (amplified alpha is used instead) */ nla_action_get_color(adt, act, color); color[3] *= 2.5f; glColor4fv(color); - /* - draw a rect from the first to the last frame (no extra overlaps for now) - * that is slightly stumpier than the track background (hardcoded 2-units here) + /* - draw a rect from the first to the last frame (no extra overlaps for now) + * that is slightly stumpier than the track background (hardcoded 2-units here) */ f1 = ((ActKeyColumn *)keys.first)->cfra; f2 = ((ActKeyColumn *)keys.last)->cfra; @@ -136,7 +136,7 @@ static void nla_action_draw_keyframes(AnimData *adt, bAction *act, View2D *v2d, glColor3f(0.0f, 0.0f, 0.0f); /* just draw each keyframe as a simple dot (regardless of the selection status) - * - size is 3.0f which is smaller than the editable keyframes, so that there is a distinction + * - size is 3.0f which is smaller than the editable keyframes, so that there is a distinction */ for (ak = keys.first; ak; ak = ak->next) draw_keyframe_shape(ak->cfra, y, xscale, 3.0f, 0, ak->key_type, KEYFRAME_SHAPE_FRAME, 1.0f); @@ -289,7 +289,7 @@ static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc) glBegin(GL_LINE_STRIP); /* sample at 1 frame intervals, and draw - * - min y-val is yminc, max is y-maxc, so clamp in those regions + * - min y-val is yminc, max is y-maxc, so clamp in those regions */ for (cfra = strip->start; cfra <= strip->end; cfra += 1.0f) { float y = evaluate_fcurve(fcu, cfra); @@ -341,7 +341,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri nla_strip_get_color_inside(adt, strip, color); /* draw extrapolation info first (as backdrop) - * - but this should only be drawn if track has some contribution + * - but this should only be drawn if track has some contribution */ if ((strip->extendmode != NLASTRIP_EXTEND_NOTHING) && (non_solo == 0)) { /* enable transparency... */ @@ -416,7 +416,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri /* draw strip's control 'curves' - * - only if user hasn't hidden them... + * - only if user hasn't hidden them... */ if ((snla->flag & SNLA_NOSTRIPCURVES) == 0) nla_draw_strip_curves(strip, yminc, ymaxc); @@ -427,7 +427,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri nla_strip_draw_markers(strip, yminc, ymaxc); /* draw strip outline - * - color used here is to indicate active vs non-active + * - color used here is to indicate active vs non-active */ if (strip->flag & NLASTRIP_FLAG_ACTIVE) { /* strip should appear 'sunken', so draw a light border around it */ @@ -469,13 +469,13 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri /* only draw first-level of child-strips, but don't draw any lines on the endpoints */ for (cs = strip->strips.first; cs; cs = cs->next) { /* draw start-line if not same as end of previous (and only if not the first strip) - * - on upper half of strip + * - on upper half of strip */ if ((cs->prev) && IS_EQF(cs->prev->end, cs->start) == 0) fdrawline(cs->start, y, cs->start, ymaxc); /* draw end-line if not the last strip - * - on lower half of strip + * - on lower half of strip */ if (cs->next) fdrawline(cs->end, yminc, cs->end, y); @@ -520,7 +520,7 @@ static void nla_draw_strip_text( col[3] = 128; /* set bounding-box for text - * - padding of 2 'units' on either side + * - padding of 2 'units' on either side */ // TODO: make this centered? rect.xmin = xminc; @@ -546,8 +546,8 @@ static void nla_draw_strip_frames_text(NlaTrack *UNUSED(nlt), NlaStrip *strip, V /* Always draw times above the strip, whereas sequencer drew below + above. * However, we should be fine having everything on top, since these tend to be * quite spaced out. - * - 1 dp is compromise between lack of precision (ints only, as per sequencer) - * while also preserving some accuracy, since we do use floats + * - 1 dp is compromise between lack of precision (ints only, as per sequencer) + * while also preserving some accuracy, since we do use floats */ /* start frame */ numstr_len = BLI_snprintf_rlen(numstr, sizeof(numstr), "%.1f", strip->start); @@ -578,10 +578,10 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *ar) items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* Update max-extent of channels here (taking into account scrollers): - * - this is done to allow the channel list to be scrollable, but must be done here - * to avoid regenerating the list again and/or also because channels list is drawn first - * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for - * start of list offset, and the second is as a correction for the scrollers. + * - this is done to allow the channel list to be scrollable, but must be done here + * to avoid regenerating the list again and/or also because channels list is drawn first + * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for + * start of list offset, and the second is as a correction for the scrollers. */ height = ((items * NLACHANNEL_STEP(snla)) + (NLACHANNEL_HEIGHT(snla) * 2)); /* don't use totrect set, as the width stays the same @@ -702,10 +702,10 @@ void draw_nla_channel_list(const bContext *C, bAnimContext *ac, ARegion *ar) items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* Update max-extent of channels here (taking into account scrollers): - * - this is done to allow the channel list to be scrollable, but must be done here - * to avoid regenerating the list again and/or also because channels list is drawn first - * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for - * start of list offset, and the second is as a correction for the scrollers. + * - this is done to allow the channel list to be scrollable, but must be done here + * to avoid regenerating the list again and/or also because channels list is drawn first + * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for + * start of list offset, and the second is as a correction for the scrollers. */ height = ((items * NLACHANNEL_STEP(snla)) + (NLACHANNEL_HEIGHT(snla) * 2)); /* don't use totrect set, as the width stays the same diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 23cd504978c..5cf3ace747b 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -617,7 +617,7 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op) nlaedit_add_tracks_empty(&ac); /* get a list of the editable tracks being shown in the NLA - * - this is limited to active ones for now, but could be expanded to + * - this is limited to active ones for now, but could be expanded to */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ACTIVE | ANIMFILTER_FOREDIT); items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); @@ -745,8 +745,8 @@ static int nlaedit_add_transition_exec(bContext *C, wmOperator *op) if (IS_EQF(s1->end, s2->start)) continue; /* make sure neither one is a transition - * - although this is impossible to create with the standard tools, - * the user may have altered the settings + * - although this is impossible to create with the standard tools, + * the user may have altered the settings */ if (ELEM(NLASTRIP_TYPE_TRANSITION, s1->type, s2->type)) continue; @@ -762,9 +762,9 @@ static int nlaedit_add_transition_exec(bContext *C, wmOperator *op) strip->type = NLASTRIP_TYPE_TRANSITION; /* generic settings - * - selected flag to highlight this to the user - * - auto-blends to ensure that blend in/out values are automatically - * determined by overlaps of strips + * - selected flag to highlight this to the user + * - auto-blends to ensure that blend in/out values are automatically + * determined by overlaps of strips */ strip->flag = NLASTRIP_FLAG_SELECT | NLASTRIP_FLAG_AUTO_BLENDS; @@ -1062,8 +1062,8 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *op) /* in case there's no space in the track above, or we haven't got a reference to it yet, try adding */ if (BKE_nlatrack_add_strip(nlt->next, nstrip) == 0) { /* need to add a new track above the one above the current one - * - if the current one is the last one, nlt->next will be NULL, which defaults to adding - * at the top of the stack anyway... + * - if the current one is the last one, nlt->next will be NULL, which defaults to adding + * at the top of the stack anyway... */ track = BKE_nlatrack_add(adt, nlt->next); BKE_nlatrack_add_strip(track, nstrip); @@ -1213,7 +1213,7 @@ static void nlaedit_split_strip_actclip(Main *bmain, AnimData *adt, NlaTrack *nl float splitframe, splitaframe; /* calculate the frames to do the splitting at - * - use current frame if within extents of strip + * - use current frame if within extents of strip */ if ((cfra > strip->start) && (cfra < strip->end)) { /* use the current frame */ @@ -1509,7 +1509,7 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op) } /* get two selected strips only (these will be metas due to prev step) to operate on - * - only allow swapping 2, as with more the context becomes unclear + * - only allow swapping 2, as with more the context becomes unclear */ for (strip = nlt->strips.first; strip; strip = stripN) { stripN = strip->next; diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c index 78e70b76564..bfc6138fb03 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -57,11 +57,11 @@ bool nlaop_poll_tweakmode_off(bContext *C) Scene *scene; /* for now, we check 2 things: - * 1) active editor must be NLA - * 2) tweakmode is currently set as a 'per-scene' flag - * so that it will affect entire NLA data-sets, - * but not all AnimData blocks will be in tweakmode for - * various reasons + * 1) active editor must be NLA + * 2) tweakmode is currently set as a 'per-scene' flag + * so that it will affect entire NLA data-sets, + * but not all AnimData blocks will be in tweakmode for + * various reasons */ if (ED_operator_nla_active(C) == 0) return 0; @@ -79,11 +79,11 @@ bool nlaop_poll_tweakmode_on(bContext *C) Scene *scene; /* for now, we check 2 things: - * 1) active editor must be NLA - * 2) tweakmode is currently set as a 'per-scene' flag - * so that it will affect entire NLA data-sets, - * but not all AnimData blocks will be in tweakmode for - * various reasons + * 1) active editor must be NLA + * 2) tweakmode is currently set as a 'per-scene' flag + * so that it will affect entire NLA data-sets, + * but not all AnimData blocks will be in tweakmode for + * various reasons */ if (ED_operator_nla_active(C) == 0) return 0; @@ -319,8 +319,8 @@ void nla_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "NLA_OT_properties", NKEY, KM_PRESS, 0, 0); /* tweakmode - * - enter and exit are separate operators with the same hotkey... - * This works as they use different poll()'s + * - enter and exit are separate operators with the same hotkey... + * This works as they use different poll()'s */ WM_keymap_add_item(keymap, "NLA_OT_tweakmode_enter", TABKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "NLA_OT_tweakmode_exit", TABKEY, KM_PRESS, 0, 0); @@ -340,10 +340,11 @@ void nla_keymap(wmKeyConfig *keyconf) /* 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. + * 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 + * However, those operations which involve clicking on channels and/or + * the placement of them in the view are implemented here instead */ keymap = WM_keymap_ensure(keyconf, "NLA Channels", SPACE_NLA, 0); nla_keymap_channels(keymap); diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 04739f0fb64..c1d62a9768d 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -79,9 +79,9 @@ static short selmodes_to_flagmodes(short sel) /* ******************** Deselect All Operator ***************************** */ /* This operator works in one of three ways: - * 1) (de)select all (AKEY) - test if select all or deselect all - * 2) invert all (CTRL-IKEY) - invert selection of all keyframes - * 3) (de)select all - no testing is done; only for use internal tools as normal function... + * 1) (de)select all (AKEY) - test if select all or deselect all + * 2) invert all (CTRL-IKEY) - invert selection of all keyframes + * 3) (de)select all - no testing is done; only for use internal tools as normal function... */ enum { @@ -91,13 +91,13 @@ enum { } /*eDeselectNlaStrips*/; /* Deselects strips in the NLA Editor - * - This is called by the deselect all operator, as well as other ones! + * - This is called by the deselect all operator, as well as other ones! * - * - test: check if select or deselect all (1) or clear all active (2) - * - sel: how to select keyframes - * 0 = deselect - * 1 = select - * 2 = invert + * - test: check if select or deselect all (1) or clear all active (2) + * - sel: how to select keyframes + * 0 = deselect + * 1 = select + * 2 = invert */ static void deselect_nla_strips(bAnimContext *ac, short test, short sel) { @@ -303,9 +303,9 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op) /* selection 'mode' depends on whether borderselect 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... + * - 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_BORDERSEL_FRAMERANGE; @@ -589,8 +589,8 @@ static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], s ACHANNEL_SET_FLAG(strip, select_mode, NLASTRIP_FLAG_SELECT); /* if we selected it, we can make it active too - * - we always need to clear the active strip flag though... - * - as well as selecting its track... + * - we always need to clear the active strip flag though... + * - as well as selecting its track... */ deselect_nla_strips(ac, DESELECT_STRIPS_CLEARACTIVE, 0); -- cgit v1.2.3