diff options
author | Richard Antalik <richardantalik@gmail.com> | 2019-05-21 22:29:17 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2019-05-21 22:29:17 +0300 |
commit | d5ffa805b2b372a25badb670cc85ff7aaf29fca6 (patch) | |
tree | 963beffbfbe19a946779153322a5f277da0cb148 /source/blender/editors/space_sequencer/sequencer_draw.c | |
parent | 9be7c831f67bce4a23de96de651f0f7a8975a690 (diff) |
VSE: Don't store `cfra` in cache
Strips can move in time. Using cfra may give us erratic results.
Reviewed by: brecht
Differential Revision: https://developer.blender.org/D4898
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_draw.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 51162c8f99f..fb875c8c4a4 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1821,7 +1821,7 @@ typedef struct CacheDrawData { /* Called as a callback */ static bool draw_cache_view_cb( - void *userdata, struct Sequence *seq, int cfra, int cache_type, float UNUSED(cost)) + void *userdata, struct Sequence *seq, int nfra, int cache_type, float UNUSED(cost)) { CacheDrawData *drawdata = userdata; const bContext *C = drawdata->C; @@ -1901,6 +1901,7 @@ static bool draw_cache_view_cb( } } + int cfra = seq->start + nfra; immUniformColor4f(color[0], color[1], color[2], color[3]); immRectf(pos, cfra, stripe_bot, cfra + 1, stripe_top); |