OpenGL animation: Fix stupid mistake form previous commit
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 10 Oct 2016 13:52:10 +0000 (15:52 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 10 Oct 2016 13:52:10 +0000 (15:52 +0200)
Flagging of pool to cancel was done in the wrong place, making last
frames missing in the final video.

source/blender/editors/render/render_opengl.c

index d9edff4a706d316510e4a185993ae18940e25887..6f3694d1db8663f2faf9c4e1b5fd7b11fc3a0fac 100644 (file)
@@ -737,8 +737,6 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender)
        int i;
 
        if (oglrender->is_animation) {
-               /* Flag pool for cancel. */
-               oglrender->pool_ok = false;
                BLI_task_pool_work_and_wait(oglrender->task_pool);
                BLI_task_pool_free(oglrender->task_pool);
                BLI_task_scheduler_free(oglrender->task_scheduler);
@@ -1053,6 +1051,7 @@ static int screen_opengl_render_modal(bContext *C, wmOperator *op, const wmEvent
        switch (event->type) {
                case ESCKEY:
                        /* cancel */
+                       oglrender->pool_ok = false;  /* Flag pool for cancel. */
                        screen_opengl_render_end(C, op->customdata);
                        return OPERATOR_FINISHED;
                case TIMER: