Fix viewport background video/clip not updating on playback

CFRA should be avoided, it is not the depsgraph current frame, it is only
updated on cow flush.
This commit is contained in:
Dalai Felinto 2018-08-14 15:52:11 -03:00
parent 6ca48a523a
commit 37f6a26e74
1 changed files with 2 additions and 2 deletions

View File

@ -515,7 +515,7 @@ static void view3d_draw_bgpic(Scene *scene, Depsgraph *depsgraph,
ima = bgpic->ima;
if (ima == NULL)
continue;
BKE_image_user_frame_calc(&bgpic->iuser, CFRA, 0);
BKE_image_user_frame_calc(&bgpic->iuser, (int)DEG_get_ctime(depsgraph), 0);
if (ima->source == IMA_SRC_SEQUENCE && !(bgpic->iuser.flag & IMA_USER_FRAME_IN_RANGE)) {
ibuf = NULL; /* frame is out of range, dont show */
}
@ -543,7 +543,7 @@ static void view3d_draw_bgpic(Scene *scene, Depsgraph *depsgraph,
if (clip == NULL)
continue;
BKE_movieclip_user_set_frame(&bgpic->cuser, CFRA);
BKE_movieclip_user_set_frame(&bgpic->cuser, (int)DEG_get_ctime(depsgraph));
ibuf = BKE_movieclip_get_ibuf(clip, &bgpic->cuser);
image_aspect[0] = clip->aspx;