diff options
author | Antonioya <blendergit@gmail.com> | 2018-08-07 14:36:30 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-08-07 14:36:47 +0300 |
commit | b274a01e58e19ef4b6e45b96cfe21c0c2597b3fe (patch) | |
tree | f5bb2ce3ed3c9fc5f1a3ab28fd945bb0fb9cda2d /source/blender/makesrna/intern/rna_sculpt_paint.c | |
parent | ac2cdb21e69b4dcfc4c273cfcf2b94f7afb789f5 (diff) |
Fix T56261: Grease Pencil simplify options get segment fault
The depsgraph was not updated as expected with the function used and the cache was not set as dirty.
Diffstat (limited to 'source/blender/makesrna/intern/rna_sculpt_paint.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index c500c5f261f..37a5376f5d5 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -35,6 +35,7 @@ #include "rna_internal.h" #include "DNA_ID.h" +#include "DNA_gpencil_types.h" #include "DNA_scene_types.h" #include "DNA_brush_types.h" #include "DNA_screen_types.h" @@ -120,7 +121,12 @@ const EnumPropertyItem rna_enum_symmetrize_direction_items[] = { static void rna_GPencil_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) { - DEG_id_type_tag(bmain, ID_GD); + /* mark all grease pencil datablocks */ + for (bGPdata *gpd = bmain->gpencil.first; gpd; gpd = gpd->id.next) { + gpd->flag |= GP_DATA_CACHE_IS_DIRTY; + DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA); + } + WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL); } |