forked from bartvdbraak/blender
Movie clip: display stabilization border even if current frame failed to load
This commit is contained in:
parent
f81e30a41f
commit
18300e8eab
@ -252,7 +252,6 @@ static void draw_movieclip_buffer(const bContext *C, SpaceClip *sc, ARegion *ar,
|
|||||||
int width, int height, float zoomx, float zoomy)
|
int width, int height, float zoomx, float zoomy)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
MovieClip *clip = ED_space_clip_get_clip(sc);
|
|
||||||
|
|
||||||
/* find window pixel coordinates of origin */
|
/* find window pixel coordinates of origin */
|
||||||
UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &x, &y);
|
UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &x, &y);
|
||||||
@ -306,6 +305,15 @@ static void draw_movieclip_buffer(const bContext *C, SpaceClip *sc, ARegion *ar,
|
|||||||
|
|
||||||
IMB_display_buffer_release(cache_handle);
|
IMB_display_buffer_release(cache_handle);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void draw_stabilization_border(SpaceClip *sc, ARegion *ar, int width, int height, float zoomx, float zoomy)
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
MovieClip *clip = ED_space_clip_get_clip(sc);
|
||||||
|
|
||||||
|
/* find window pixel coordinates of origin */
|
||||||
|
UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &x, &y);
|
||||||
|
|
||||||
/* draw boundary border for frame if stabilization is enabled */
|
/* draw boundary border for frame if stabilization is enabled */
|
||||||
if (sc->flag & SC_SHOW_STABLE && clip->tracking.stabilization.flag & TRACKING_2D_STABILIZATION) {
|
if (sc->flag & SC_SHOW_STABLE && clip->tracking.stabilization.flag & TRACKING_2D_STABILIZATION) {
|
||||||
@ -1469,6 +1477,7 @@ void clip_draw_main(const bContext *C, SpaceClip *sc, ARegion *ar)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (width && height) {
|
if (width && height) {
|
||||||
|
draw_stabilization_border(sc, ar, width, height, zoomx, zoomy);
|
||||||
draw_tracking_tracks(sc, ar, clip, width, height, zoomx, zoomy);
|
draw_tracking_tracks(sc, ar, clip, width, height, zoomx, zoomy);
|
||||||
draw_distortion(sc, ar, clip, width, height, zoomx, zoomy);
|
draw_distortion(sc, ar, clip, width, height, zoomx, zoomy);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user