Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2019-09-10 18:47:17 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-09-10 18:49:27 +0300
commit5ba0726bc1a7c7343e9d31e01c15bb3510256bb7 (patch)
tree1c76fe05b15317eb0e2d5a0c118c389ce291fa71 /source/blender/makesrna/intern/rna_scene.c
parent841df2b98e785649a6346d3c6e560a168186eef3 (diff)
GPencil: Deduplicate function
The same code was duplicated and now it was moved to shared function.
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index a91f703cbd0..efa3b9d17a9 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -712,20 +712,7 @@ static void rna_ToolSettings_snap_mode_set(struct PointerRNA *ptr, int value)
/* Grease Pencil update cache */
static void rna_GPencil_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
{
- /* mark all grease pencil datablocks of the scene */
- FOREACH_SCENE_COLLECTION_BEGIN (scene, collection) {
- FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (collection, ob) {
- if (ob->type == OB_GPENCIL) {
- bGPdata *gpd = (bGPdata *)ob->data;
- gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
- DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
- }
- }
- FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
- }
- FOREACH_SCENE_COLLECTION_END;
-
- WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
+ ED_gpencil_tag_scene_gpencil(scene);
}
/* Grease Pencil Interpolation settings */