diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 5c072d1ad8b..7cc074a74fd 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -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(CFRAnfra) { 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); diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index ced8f9a8464..1bd1fef4673 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -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;