diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-18 14:24:38 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-18 14:24:38 +0400 |
commit | f314ff02bda2ad959b6dc374d090047d270cd885 (patch) | |
tree | 571a0891984a83b030a6fbdbfeee07c131c7017d | |
parent | 11186184aa7af143e72c539be0ed06c3ef37a146 (diff) |
Fix #35390: sequencer end frame of preview range was not drawing correct.
6 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index bd4c2347815..8ebb13febec 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -251,7 +251,7 @@ void ANIM_draw_cfra(const bContext *C, View2D *v2d, short flag) /* Note: 'Preview Range' tools are defined in anim_ops.c */ /* Draw preview range 'curtains' for highlighting where the animation data is */ -void ANIM_draw_previewrange(const bContext *C, View2D *v2d) +void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width) { Scene *scene = CTX_data_scene(C); @@ -262,9 +262,9 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d) glColor4f(0.0f, 0.0f, 0.0f, 0.4f); /* only draw two separate 'curtains' if there's no overlap between them */ - if (PSFRA < PEFRA) { + if (PSFRA < PEFRA+end_frame_width) { glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax); - glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); + glRectf((float)(PEFRA+end_frame_width), v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); } else { glRectf(v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index f698f9b0b11..1de1731b515 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -491,7 +491,7 @@ void ANIM_draw_cfra(const struct bContext *C, struct View2D *v2d, short flag); /* ------------- Preview Range Drawing -------------- */ /* main call to draw preview range curtains */ -void ANIM_draw_previewrange(const struct bContext *C, struct View2D *v2d); +void ANIM_draw_previewrange(const struct bContext *C, struct View2D *v2d, int end_frame_width); /* ************************************************* */ /* F-MODIFIER TOOLS */ diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 61477f0730e..b2bb455a0ba 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -204,7 +204,7 @@ static void action_main_area_draw(const bContext *C, ARegion *ar) /* preview range */ UI_view2d_view_ortho(v2d); - ANIM_draw_previewrange(C, v2d); + ANIM_draw_previewrange(C, v2d, 0); /* callback */ UI_view2d_view_ortho(v2d); diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 3f9737b3c5d..1a208ee2eb6 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -294,7 +294,7 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar) /* preview range */ UI_view2d_view_ortho(v2d); - ANIM_draw_previewrange(C, v2d); + ANIM_draw_previewrange(C, v2d, 0); /* callback */ UI_view2d_view_ortho(v2d); diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index b3d8d5d5aad..4ef84b3e708 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -310,7 +310,7 @@ static void nla_main_area_draw(const bContext *C, ARegion *ar) /* preview range */ UI_view2d_view_ortho(v2d); - ANIM_draw_previewrange(C, v2d); + ANIM_draw_previewrange(C, v2d, 0); /* callback */ UI_view2d_view_ortho(v2d); diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 3a5d1b9f7e3..f84cca90082 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1457,7 +1457,7 @@ void draw_timeline_seq(const bContext *C, ARegion *ar) /* preview range */ UI_view2d_view_ortho(v2d); - ANIM_draw_previewrange(C, v2d); + ANIM_draw_previewrange(C, v2d, 1); /* overlap playhead */ if (scene->ed && scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW) { |