Commit: 80011e847d97fad861bf5e5edd9a867430b8690c
Author: YimingWu
Date:   Wed Jun 10 22:56:23 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB80011e847d97fad861bf5e5edd9a867430b8690c

LANPR: Baking in frame range is now working.

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

M       source/blender/editors/lanpr/lanpr_cpu.c
M       source/blender/editors/render/render_update.c

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

diff --git a/source/blender/editors/lanpr/lanpr_cpu.c 
b/source/blender/editors/lanpr/lanpr_cpu.c
index 01a0951181f..fa6e6ccbe78 100644
--- a/source/blender/editors/lanpr/lanpr_cpu.c
+++ b/source/blender/editors/lanpr/lanpr_cpu.c
@@ -4325,8 +4325,8 @@ static int lanpr_bake_gp_strokes_exec(bContext *C, 
wmOperator *UNUSED(op))
   int frame_end = scene->r.efra;
 
   for (frame = frame_begin; frame <= frame_end; frame++) {
-    // BKE_scene_frame_set(scene,frame);
-    DEG_evaluate_on_framechange(CTX_data_main(C), dg, frame);
+    BKE_scene_frame_set(scene, frame);
+    BKE_scene_graph_update_for_newframe(dg, CTX_data_main(C));
 
     BLI_spin_lock(&lanpr_share.lock_loader);
     ED_lanpr_compute_feature_lines_internal(dg, 0);
diff --git a/source/blender/editors/render/render_update.c 
b/source/blender/editors/render/render_update.c
index b4e5eb2a047..e4ce6c44281 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -101,7 +101,9 @@ void ED_render_scene_update(const DEGEditorUpdateContext 
*update_ctx, int update
 
 #ifdef WITH_LANPR
   /* Temporary solution for updating LANPR GPencil targets. */
-  ED_lanpr_post_frame_update_external(scene, update_ctx->depsgraph);
+  if (updated) {
+    ED_lanpr_post_frame_update_external(scene, update_ctx->depsgraph);
+  }
 #endif
   recursive_check = true;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to