Commit: 5fc69361be52339f49ead4a036261c9993eaf375 Author: YimingWu Date: Tue Jul 28 11:49:15 2020 +0800 Branches: lanpr-under-gp https://developer.blender.org/rB5fc69361be52339f49ead4a036261c9993eaf375
LineArt: Ensure notification of line art gpencil objects when enable/disableing line art. =================================================================== M source/blender/editors/lineart/lineart_cpu.c M source/blender/makesrna/intern/rna_scene.c =================================================================== diff --git a/source/blender/editors/lineart/lineart_cpu.c b/source/blender/editors/lineart/lineart_cpu.c index b44668d7b65..ad155fa99f9 100644 --- a/source/blender/editors/lineart/lineart_cpu.c +++ b/source/blender/editors/lineart/lineart_cpu.c @@ -3948,6 +3948,11 @@ void SCENE_OT_lineart_bake_strokes(wmOperatorType *ot) void ED_lineart_post_frame_update_external(bContext *C, Scene *scene, Depsgraph *dg) { if (!(scene->lineart.flags & LRT_AUTO_UPDATE)) { + /* This way the modifier will update, removing remaing strokes in the viewport. */ + if (ED_lineart_modifier_sync_flag_check(LRT_SYNC_WAITING)) { + ED_lineart_modifier_sync_flag_set(LRT_SYNC_IDLE, false); + lineart_gpencil_notify_targets(dg); + } return; } if (ED_lineart_modifier_sync_flag_check(LRT_SYNC_WAITING)) { diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 2719ffe6a83..08a42b76b24 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -7288,7 +7288,8 @@ static void rna_def_scene_lineart(BlenderRNA *brna) RNA_def_property_boolean_default(prop, 0); RNA_def_property_ui_text( prop, "Auto Update", "Automatically update Line Art cache when frame changes"); - RNA_def_property_update(prop, NC_SCENE, NULL); + /* Also use this update callback to trigger the modifier to clear the frame */ + RNA_def_property_update(prop, NC_SCENE, "rna_lineart_update"); prop = RNA_def_property(srna, "gpencil_overwrite", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", LRT_GPENCIL_OVERWRITE); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs