diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-15 15:24:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-15 15:30:31 +0300 |
commit | b8e8c0e325d213f2dcf4adad5506989fa224716e (patch) | |
tree | adb3d7fa8735426ea856a929f562655b2eaf64cb /source/blender/editors/space_nla | |
parent | 4226ee0b71fec6f08897dacf3d6632526618acca (diff) |
Cleanup: comment line length (editors)
Prevents clang-format wrapping text before comments.
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r-- | source/blender/editors/space_nla/nla_buttons.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_channels.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_draw.c | 21 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_edit.c | 48 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_select.c | 9 |
5 files changed, 62 insertions, 31 deletions
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index d5d50c86851..3723f10b316 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -156,7 +156,8 @@ bool nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA *nlt_p id = ale->id; } else { - /* ale->data is always the proper ID block we need, but ale->id may not be (i.e. for textures) */ + /* ale->data is always the proper ID block we need, + * but ale->id may not be (i.e. for textures) */ id = (ID *)ale->data; } diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 2bd5bafe2d4..f9a8ab29601 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -68,7 +68,8 @@ #include "nla_intern.h" // own include /* *********************************************** */ -/* Operators for NLA channels-list which need to be different from the standard Animation Editor ones */ +/* Operators for NLA channels-list which need to be different + * from the standard Animation Editor ones */ /* ******************** Mouse-Click Operator *********************** */ /* Depending on the channel that was clicked on, the mouse click will activate whichever @@ -260,7 +261,8 @@ static int mouse_nla_channels(bContext *C, bAnimContext *ac, float x, int channe nlt->flag |= NLATRACK_SELECTED; } - /* if NLA-Track is selected now, make NLA-Track the 'active' one in the visible list */ + /* if NLA-Track is selected now, + * make NLA-Track the 'active' one in the visible list */ if (nlt->flag & NLATRACK_SELECTED) ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nlt, ANIMTYPE_NLATRACK); @@ -557,7 +559,8 @@ static int nla_action_unlink_exec(bContext *C, wmOperator *op) static int nla_action_unlink_invoke(bContext *C, wmOperator *op, const wmEvent *evt) { - /* NOTE: this is hardcoded to match the behavior for the unlink button (in interface_templates.c) */ + /* NOTE: this is hardcoded to match the behavior for the unlink button + * (in interface_templates.c) */ RNA_boolean_set(op->ptr, "force_delete", evt->shift != 0); return nla_action_unlink_exec(C, op); } @@ -614,7 +617,8 @@ bool nlaedit_add_tracks_existing(bAnimContext *ac, bool above_sel) added = true; } else if ((lastAdt == NULL) || (adt != lastAdt)) { - /* add one track to the top of the owning AnimData's stack, then don't add anymore to this stack */ + /* add one track to the top of the owning AnimData's stack, + * then don't add anymore to this stack */ BKE_nlatrack_add(adt, NULL); lastAdt = adt; ale->update = ANIM_UPDATE_DEPS; diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index e71aee42a1e..96e6a0e479d 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -95,7 +95,8 @@ void nla_action_get_color(AnimData *adt, bAction *act, float color[4]) } } - /* when an NLA track is tagged "solo", action doesn't contribute, so shouldn't be as prominent */ + /* when an NLA track is tagged "solo", action doesn't contribute, + * so shouldn't be as prominent */ if (adt && (adt->flag & ADT_NLA_SOLO_TRACK)) color[3] *= 0.15f; } @@ -339,7 +340,8 @@ static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc, uns if ((IS_EQF(strip->blendin, 0.0f) && IS_EQF(strip->blendout, 0.0f)) == 0) { immBeginAtMost(GPU_PRIM_LINE_STRIP, 4); - /* start of strip - if no blendin, start straight at 1, otherwise from 0 to 1 over blendin frames */ + /* start of strip - if no blendin, start straight at 1, + * otherwise from 0 to 1 over blendin frames */ if (IS_EQF(strip->blendin, 0.0f) == 0) { immVertex2f(pos, strip->start, yminc); immVertex2f(pos, strip->start + strip->blendin, ymaxc); @@ -417,7 +419,8 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri GPU_blend(true); switch (strip->extendmode) { - /* since this does both sides, only do the 'before' side, and leave the rest to the next case */ + /* since this does both sides, + * only do the 'before' side, and leave the rest to the next case */ case NLASTRIP_EXTEND_HOLD: /* only need to draw here if there's no strip before since * it only applies in such a situation @@ -479,7 +482,8 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri immUnbindProgram(); - /* draw markings indicating locations of local markers (useful for lining up different actions) */ + /* draw markings indicating locations of local markers + * (useful for lining up different actions) */ if ((snla->flag & SNLA_NOLOCALMARKERS) == 0) nla_strip_draw_markers(strip, yminc, ymaxc); @@ -532,11 +536,13 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri } immEnd(); } - /* or if meta-strip, draw lines delimiting extents of sub-strips (in same color as outline, if more than 1 exists) */ + /* or if meta-strip, draw lines delimiting extents of sub-strips + * (in same color as outline, if more than 1 exists) */ else if ((strip->type == NLASTRIP_TYPE_META) && (strip->strips.first != strip->strips.last)) { const float y = (ymaxc - yminc) * 0.5f + yminc; - immBeginAtMost(GPU_PRIM_LINES, 4 * BLI_listbase_count(&strip->strips)); /* up to 2 lines per strip */ + /* up to 2 lines per strip */ + immBeginAtMost(GPU_PRIM_LINES, 4 * BLI_listbase_count(&strip->strips)); /* only draw first-level of child-strips, but don't draw any lines on the endpoints */ for (NlaStrip *cs = strip->strips.first; cs; cs = cs->next) { @@ -798,7 +804,8 @@ void draw_nla_channel_list(const bContext *C, bAnimContext *ac, ARegion *ar) * (NOTE: this is ok here, the configuration is pretty straightforward) */ v2d->tot.ymin = (float)(-height); - /* need to do a view-sync here, so that the keys area doesn't jump around (it must copy this) */ + /* need to do a view-sync here, so that the keys area doesn't jump around + * (it must copy this) */ UI_view2d_sync(NULL, ac->sa, v2d, V2D_LOCK_COPY); /* draw channels */ diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 3cab4cfefca..5d88714ee76 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -418,7 +418,8 @@ static bool nla_channels_get_selected_extents(bAnimContext *ac, float *min, floa SpaceNla *snla = (SpaceNla *)ac->sl; const float half_height = NLACHANNEL_HEIGHT_HALF(snla); - short found = 0; /* NOTE: not bool, since we want prioritise individual channels over expanders */ + /* NOTE: not bool, since we want prioritise individual channels over expanders */ + short found = 0; float y; /* get all items - we need to do it this way */ @@ -480,7 +481,8 @@ static int nlaedit_viewall(bContext *C, const bool only_sel) /* set vertical range */ if (only_sel == false) { - /* view all -> the summary channel is usually the shows everything, and resides right at the top... */ + /* view all -> the summary channel is usually the shows everything, + * and resides right at the top... */ v2d->cur.ymax = 0.0f; v2d->cur.ymin = (float)-BLI_rcti_size_y(&v2d->mask); } @@ -580,7 +582,8 @@ void NLA_OT_view_frame(wmOperatorType *ot) /* NLA Editing Operations (Constructive/Destructive) */ /* ******************** Add Action-Clip Operator ***************************** */ -/* Add a new Action-Clip strip to the active track (or the active block if no space in the track) */ +/* Add a new Action-Clip strip to the active track + * (or the active block if no space in the track) */ /* add the specified action as new strip */ @@ -614,7 +617,8 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } else if (act->idroot == 0) { - /* hopefully in this case (i.e. library of userless actions), the user knows what they're doing... */ + /* hopefully in this case (i.e. library of userless actions), + * the user knows what they're doing... */ BKE_reportf(op->reports, RPT_WARNING, "Action '%s' does not specify what data-blocks it can be used on " "(try setting the 'ID Root Type' setting from the data-blocks editor " @@ -639,7 +643,8 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* for every active track, try to add strip to free space in track or to the top of the stack if no space */ + /* for every active track, + * try to add strip to free space in track or to the top of the stack if no space */ for (ale = anim_data.first; ale; ale = ale->next) { NlaTrack *nlt = (NlaTrack *)ale->data; AnimData *adt = ale->adt; @@ -1078,7 +1083,8 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *op) /* make a copy (assume that this is possible) */ nstrip = BKE_nlastrip_copy(ac.bmain, strip, linked, 0); - /* in case there's no space in the track above, or we haven't got a reference to it yet, try adding */ + /* 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 @@ -1509,7 +1515,8 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op) nlt->name); } else if (sa == NULL) { - /* no warning as this is just a common case, and it may get annoying when doing multiple tracks */ + /* no warning as this is just a common case, + * and it may get annoying when doing multiple tracks */ } else if (sb == NULL) { /* too few selected warning */ @@ -1520,7 +1527,8 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op) else { float nsa[2], nsb[2]; - /* remove these strips from the track, so that we can test if they can fit in the proposed places */ + /* remove these strips from the track, + * so that we can test if they can fit in the proposed places */ BLI_remlink(&nlt->strips, sa); BLI_remlink(&nlt->strips, sb); @@ -1633,7 +1641,8 @@ static int nlaedit_move_up_exec(bContext *C, wmOperator *UNUSED(op)) if (strip->flag & NLASTRIP_FLAG_SELECT) { /* check if the track above has room for this strip */ if (BKE_nlatrack_has_space(nltn, strip->start, strip->end)) { - /* remove from its current track, and add to the one above (it 'should' work, so no need to worry) */ + /* remove from its current track, and add to the one above + * (it 'should' work, so no need to worry) */ BLI_remlink(&nlt->strips, strip); BKE_nlatrack_add_strip(nltn, strip); } @@ -1707,7 +1716,8 @@ static int nlaedit_move_down_exec(bContext *C, wmOperator *UNUSED(op)) if (strip->flag & NLASTRIP_FLAG_SELECT) { /* check if the track below has room for this strip */ if (BKE_nlatrack_has_space(nltp, strip->start, strip->end)) { - /* remove from its current track, and add to the one above (it 'should' work, so no need to worry) */ + /* remove from its current track, and add to the one above + * (it 'should' work, so no need to worry) */ BLI_remlink(&nlt->strips, strip); BKE_nlatrack_add_strip(nltp, strip); } @@ -1953,23 +1963,27 @@ static int nlaedit_apply_scale_exec(bContext *C, wmOperator *UNUSED(op)) NlaStrip *strip; for (strip = nlt->strips.first; strip; strip = strip->next) { - /* strip must be selected, and must be action-clip only (transitions don't have scale) */ + /* strip must be selected, and must be action-clip only + * (transitions don't have scale) */ if ((strip->flag & NLASTRIP_FLAG_SELECT) && (strip->type == NLASTRIP_TYPE_CLIP)) { - /* if the referenced action is used by other strips, make this strip use its own copy */ + /* if the referenced action is used by other strips, + * make this strip use its own copy */ if (strip->act == NULL) continue; if (strip->act->id.us > 1) { /* make a copy of the Action to work on */ bAction *act = BKE_action_copy(bmain, strip->act); - /* set this as the new referenced action, decrementing the users of the old one */ + /* set this as the new referenced action, + * decrementing the users of the old one */ id_us_min(&strip->act->id); strip->act = act; copied = true; } - /* setup iterator, and iterate over all the keyframes in the action, applying this scaling */ + /* setup iterator, and iterate over all the keyframes in the action, + * applying this scaling */ ked.data = strip; ANIM_animchanneldata_keyframes_loop(&ked, ac.ads, strip->act, ALE_ACT, NULL, bezt_apply_nlamapping, calchandles_fcurve); @@ -2040,7 +2054,8 @@ static int nlaedit_clear_scale_exec(bContext *C, wmOperator *UNUSED(op)) NlaStrip *strip; for (strip = nlt->strips.first; strip; strip = strip->next) { - /* strip must be selected, and must be action-clip only (transitions don't have scale) */ + /* strip must be selected, and must be action-clip only + * (transitions don't have scale) */ if ((strip->flag & NLASTRIP_FLAG_SELECT) && (strip->type == NLASTRIP_TYPE_CLIP)) { PointerRNA strip_ptr; @@ -2182,7 +2197,8 @@ static int nlaedit_snap_exec(bContext *C, wmOperator *op) track = BKE_nlatrack_add(adt, nlt); BKE_nlatrack_add_strip(track, strip); - /* clear temp meta-strips on this new track, as we may not be able to get back to it */ + /* clear temp meta-strips on this new track, + * as we may not be able to get back to it */ BKE_nlastrips_clear_metas(&track->strips, 0, 1); } } diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index db7f5d707d2..a49c5577451 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -536,7 +536,8 @@ static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], s float x, y; - /* use View2D to determine the index of the channel (i.e a row in the list) where keyframe was */ + /* use View2D to determine the index of the channel + * (i.e a row in the list) where keyframe was */ UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y); UI_view2d_listview_view_to_cell(v2d, 0, NLACHANNEL_STEP(snla), 0, (float)NLACHANNEL_HEIGHT_HALF(snla), x, y, NULL, &channel_index); @@ -563,14 +564,16 @@ static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], s if (ale->type == ANIMTYPE_NLATRACK) { NlaTrack *nlt = (NlaTrack *)ale->data; - /* loop over NLA-strips in this track, trying to find one which occurs in the necessary bounds */ + /* loop over NLA-strips in this track, + * trying to find one which occurs in the necessary bounds */ for (strip = nlt->strips.first; strip; strip = strip->next) { if (BKE_nlastrip_within_bounds(strip, xmin, xmax)) break; } } - /* remove active channel from list of channels for separate treatment (since it's needed later on) */ + /* remove active channel from list of channels for separate treatment + * (since it's needed later on) */ BLI_remlink(&anim_data, ale); /* free list of channels, since it's not used anymore */ |