diff options
author | Wayde Moss <GuiltyGhost> | 2020-12-30 22:29:12 +0300 |
---|---|---|
committer | Wayde Moss <wbmoss_dev@yahoo.com> | 2020-12-30 22:30:02 +0300 |
commit | dc4f3080fde5803e358e51e44668417291c1a3f5 (patch) | |
tree | 02465eda9eee72d0a4163dcd90ad4f16d845a068 /source/blender/editors | |
parent | 164e117abab8e534194d8214710979da35d0698a (diff) |
NLA: Strip Evaluate Held Strips Even When Not First Striptmp-T82230-nla_remove_hold_reset_behavior
Changes NLA strip evaluation.
A visual example of the change (with current frame between both strips):
**Before**:
| First strip extrapolation | Next strip extrapolation | Evaluated Strip
| None | Hold | Neither
| Hold or Hold_Forward| Hold | First
**Now**:
| First strip extrapolation | Next strip extrapolation | Evaluated Strip
| None | Hold | Next
| Hold or Hold_Forward | Hold | First
There isn't a concrete use-case for this new behavior. It's more to avoid the case of [None | Hold | Neither] which appears buggy.
UI-wise, the case of `Hold`/`Hold_Forward` leading to a `Hold` will draw with a slightly darker extrapolation area overlay. Pre-extrapolation and post-extrapolation alpha is changed to the same value now too.
Part of {T82230}
This patch functionally depends on {D9942} to sanely test this patch.
Differential Revision: https://developer.blender.org/D9943
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_nla/nla_draw.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 */ |