bugfix where animated image texture's lagged one frame when used with modifiers.
call animated texture update before evaluating modifiers.
This commit is contained in:
@@ -305,6 +305,10 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
|
||||
int ok= 0;
|
||||
int view_context = (oglrender->v3d != NULL);
|
||||
|
||||
/* update animated image textures for gpu, etc,
|
||||
* call before scene_update_for_newframe so modifiers with textuers dont lag 1 frame */
|
||||
ED_image_update_frame(C);
|
||||
|
||||
/* go to next frame */
|
||||
while(CFRA<oglrender->nfra) {
|
||||
unsigned int lay= screen_opengl_layers(oglrender);
|
||||
@@ -330,9 +334,6 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
|
||||
scene_camera_switch_update(scene);
|
||||
}
|
||||
|
||||
/* update animated image textures for gpu, etc */
|
||||
ED_image_update_frame(C);
|
||||
|
||||
/* render into offscreen buffer */
|
||||
screen_opengl_render_apply(oglrender);
|
||||
|
||||
|
||||
@@ -1737,6 +1737,10 @@ void ED_update_for_newframe(const bContext *C, int mute)
|
||||
|
||||
//extern void audiostream_scrub(unsigned int frame); /* seqaudio.c */
|
||||
|
||||
/* update animated image textures for gpu, etc,
|
||||
* call before scene_update_for_newframe so modifiers with textuers dont lag 1 frame */
|
||||
ED_image_update_frame(C);
|
||||
|
||||
/* this function applies the changes too */
|
||||
/* XXX future: do all windows */
|
||||
scene_update_for_newframe(scene, BKE_screen_visible_layers(screen, scene)); /* BKE_scene.h */
|
||||
@@ -1754,9 +1758,6 @@ void ED_update_for_newframe(const bContext *C, int mute)
|
||||
if(scene->use_nodes && scene->nodetree)
|
||||
ntreeCompositTagAnimated(scene->nodetree);
|
||||
|
||||
/* update animated image textures for gpu, etc */
|
||||
ED_image_update_frame(C);
|
||||
|
||||
/* update animated texture nodes */
|
||||
{
|
||||
Tex *tex;
|
||||
|
||||
Reference in New Issue
Block a user