diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 09:12:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 09:21:34 +0300 |
commit | 55e719ec35a10c3f9e7231dee13d4b05aad7d965 (patch) | |
tree | 563ed5b1b27e9613de8384da90197ce2c3e1924b /source/blender/editors/space_nla/nla_draw.c | |
parent | c279f879ab86e03dff0dbfd3a36b14bebb4956f9 (diff) | |
parent | d7f55c4ff58f87b80f0ce2fa43ce2f7cd2b72675 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/space_nla/nla_draw.c')
-rw-r--r-- | source/blender/editors/space_nla/nla_draw.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 15a66b225c9..2cba6cf2fb2 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -112,8 +112,8 @@ static void nla_action_draw_keyframes(View2D *v2d, AnimData *adt, bAction *act, 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) */ float color[4]; nla_action_get_color(adt, act, color); @@ -126,8 +126,8 @@ static void nla_action_draw_keyframes(View2D *v2d, AnimData *adt, bAction *act, immUniformColor4fv(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) */ float f1 = ((ActKeyColumn *)keys.first)->cfra; float f2 = ((ActKeyColumn *)keys.last)->cfra; @@ -152,7 +152,7 @@ static void nla_action_draw_keyframes(View2D *v2d, AnimData *adt, bAction *act, immBegin(GPU_PRIM_POINTS, key_len); /* - disregard the selection status of keyframes so they draw a certain way - * - size is 6.0f which is smaller than the editable keyframes, so that there is a distinction + * - size is 6.0f which is smaller than the editable keyframes, so that there is a distinction */ for (ActKeyColumn *ak = keys.first; ak; ak = ak->next) { draw_keyframe_shape(ak->cfra, y, 6.0f, false, ak->key_type, KEYFRAME_SHAPE_FRAME, 1.0f, @@ -323,7 +323,7 @@ static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc, uns immBegin(GPU_PRIM_LINE_STRIP, abs((int)(strip->end - strip->start) + 1)); /* 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); /* assume this to be in 0-1 range */ @@ -409,7 +409,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_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... */ @@ -472,7 +472,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, shdr_pos); @@ -484,7 +484,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 */ @@ -541,7 +541,7 @@ 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 (NlaStrip *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) { immVertex2f(shdr_pos, cs->start, y); @@ -549,7 +549,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri } /* draw end-line if not the last strip - * - on lower half of strip + * - on lower half of strip */ if (cs->next) { immVertex2f(shdr_pos, cs->end, yminc); @@ -596,7 +596,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? */ rctf rect = { @@ -623,8 +623,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); @@ -649,10 +649,10 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *ar) size_t 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. */ int height = ((items * NLACHANNEL_STEP(snla)) + (NLACHANNEL_HEIGHT(snla) * 2)); @@ -788,10 +788,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. */ int height = ((items * NLACHANNEL_STEP(snla)) + (NLACHANNEL_HEIGHT(snla) * 2)); /* don't use totrect set, as the width stays the same |