[Bf-blender-cvs] [fcafc06829c] temp-lineart-contained: LineArt: Bake canceling now operative.

YimingWu noreply at git.blender.org
Fri Mar 12 02:47:08 CET 2021


Commit: fcafc06829cf9e6210e7bc3b3fa3b58ce7a3eaa6
Author: YimingWu
Date:   Fri Mar 12 09:24:44 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rBfcafc06829cf9e6210e7bc3b3fa3b58ce7a3eaa6

LineArt: Bake canceling now operative.

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

M	source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c

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

diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
index b150c0339c7..25780387b34 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
@@ -27,6 +27,7 @@
 
 #include "BKE_collection.h"
 #include "BKE_context.h"
+#include "BKE_global.h"
 #include "BKE_gpencil.h"
 #include "BKE_report.h"
 #include "BKE_scene.h"
@@ -165,6 +166,10 @@ static bool lineart_gpencil_bake_single_target(LineartBakeJob *bj, Object *ob)
       }
     }
 
+    if (G.is_break) {
+      return touched;
+    }
+
     *bj->progress = (float)(frame - bj->frame_begin) / (bj->frame_end - bj->frame_begin);
   }
   return touched;
@@ -176,6 +181,7 @@ static void lineart_gpencil_bake_startjob(void *customdata,
                                           float *progress)
 {
   LineartBakeJob *bj = (LineartBakeJob *)customdata;
+  bj->stop = stop;
   bj->do_update = do_update;
   bj->progress = progress;



More information about the Bf-blender-cvs mailing list