[Bf-blender-cvs] [2a4e6aaf486] lanpr-under-gp: LineArt: Allow applying of the modifier.
YimingWu
noreply at git.blender.org
Wed Jul 29 10:54:32 CEST 2020
Commit: 2a4e6aaf486efc34b71afd55c589632312cb001b
Author: YimingWu
Date: Wed Jul 29 16:53:09 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB2a4e6aaf486efc34b71afd55c589632312cb001b
LineArt: Allow applying of the modifier.
===================================================================
M source/blender/editors/lineart/lineart_cpu.c
M source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
===================================================================
diff --git a/source/blender/editors/lineart/lineart_cpu.c b/source/blender/editors/lineart/lineart_cpu.c
index b852d7bf1a1..80f8c2b820a 100644
--- a/source/blender/editors/lineart/lineart_cpu.c
+++ b/source/blender/editors/lineart/lineart_cpu.c
@@ -3927,7 +3927,7 @@ void ED_lineart_post_frame_update_external(bContext *C, Scene *scene, Depsgraph
* really don't need to keep the buffer any longer. If in the future we want fast refresh on
* parameter changes (e.g. thickness or picking different result in an already validated
* buffer), remove this call below. */
- // ED_lineart_destroy_render_data_external();
+ ED_lineart_destroy_render_data_external();
}
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index 4e11402eb38..1b41715bb9d 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -66,6 +66,8 @@
#include "WM_api.h"
#include "WM_types.h"
+extern LineartSharedResource lineart_share;
+
static void initData(GpencilModifierData *md)
{
LineartGpencilModifierData *lmd = (LineartGpencilModifierData *)md;
@@ -223,9 +225,15 @@ static void bakeModifier(Main *UNUSED(bmain),
}
if (scene->lineart.flags & LRT_AUTO_UPDATE) {
- while (ED_lineart_modifier_sync_flag_check(LRT_SYNC_WAITING)) {
- ; /* If auto update is on, line art would be running if LRT_SYNC_WAITING is set, we just
- wait for it's done.*/
+ if (ED_lineart_modifier_sync_flag_check(LRT_SYNC_IDLE)) {
+ /* Need to run it once again. */
+ ED_lineart_modifier_sync_flag_set(LRT_SYNC_WAITING, 1);
+ BLI_spin_lock(&lineart_share.lock_loader);
+ ED_lineart_compute_feature_lines_background(depsgraph, 1);
+ }
+ while (!ED_lineart_modifier_sync_flag_check(LRT_SYNC_FRESH) ||
+ !ED_lineart_calculation_flag_check(LRT_RENDER_FINISHED)) {
+ /* Wait till it's done. */
}
}
else if (!ED_lineart_modifier_sync_flag_check(LRT_SYNC_FRESH) ||
More information about the Bf-blender-cvs
mailing list