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:
2010-06-25 12:28:35 +00:00
parent f3ffb22598
commit c2db42adaa
2 changed files with 8 additions and 6 deletions

View File

@@ -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);

View File

@@ -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;