[Bf-blender-cvs] [37f6a26e742] blender2.8: Fix viewport background video/clip not updating on playback

Dalai Felinto noreply at git.blender.org
Tue Aug 14 21:08:10 CEST 2018


Commit: 37f6a26e742d54e3d366289397f0598e1ef1f770
Author: Dalai Felinto
Date:   Tue Aug 14 15:52:11 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB37f6a26e742d54e3d366289397f0598e1ef1f770

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.

===================================================================

M	source/blender/editors/space_view3d/view3d_draw_legacy.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index 45e4c4b4676..558af718101 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -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;



More information about the Bf-blender-cvs mailing list