diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_draw.c | 8 |
2 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 20956d6eb18..cef82ade906 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -877,17 +877,19 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, side = NES_TIME_BEFORE; } else { - /* before next strip - previous strip has ended, but next hasn't begun, - * so blending mode depends on whether strip is being held or not... - * - only occurs when no transition strip added, otherwise the transition would have - * been picked up above... - */ - strip = strip->prev; + /* Before current strip - previous strip has ended, but current hasn't begun. */ - if (strip->extendmode != NLASTRIP_EXTEND_NOTHING) { + /* Order of branch important to give previous strip extrapolation higher priority.*/ + if (strip->prev->extendmode != NLASTRIP_EXTEND_NOTHING) { + /* Previous strip extrapolates forward. */ + estrip = strip->prev; + side = NES_TIME_AFTER; + } + else if (strip->extendmode == NLASTRIP_EXTEND_HOLD) { + /* Let current strip extrapolates backward. */ estrip = strip; + side = NES_TIME_BEFORE; } - side = NES_TIME_AFTER; } break; } diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 6fe980cf657..0ff656f340a 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -463,11 +463,17 @@ static void nla_draw_strip(SpaceNla *snla, */ if (strip->prev == NULL) { /* set the drawing color to the color of the strip, but with very faint alpha */ - immUniformColor3fvAlpha(color, 0.15f); + immUniformColor3fvAlpha(color, 0.30f); /* draw the rect to the edge of the screen */ immRectf(shdr_pos, v2d->cur.xmin, yminc, strip->start, ymaxc); } + else { + immUniformColor3fvAlpha(color, 0.30f); + /* Draw the rect to the prev strip. This will overlap with previous strip's Hold_Forward + * which is OK. */ + immRectf(shdr_pos, strip->prev->end, yminc, strip->start, ymaxc); + } ATTR_FALLTHROUGH; /* this only draws after the strip */ |