From f425de9341753addf39b12aac9ba16c6cba4f7ee Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 22 Nov 2014 18:04:08 +1300 Subject: Bugfix T42549: Grease pencil layers are not scene-specific for "full copy scenes" --- source/blender/blenkernel/intern/scene.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 168fa9ad120..b0a94cdb764 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -70,6 +70,7 @@ #include "BKE_fcurve.h" #include "BKE_freestyle.h" #include "BKE_global.h" +#include "BKE_gpencil.h" #include "BKE_group.h" #include "BKE_idprop.h" #include "BKE_image.h" @@ -308,6 +309,19 @@ Scene *BKE_scene_copy(Scene *sce, int type) BKE_sequence_base_dupli_recursive(sce, scen, &scen->ed->seqbase, &sce->ed->seqbase, SEQ_DUPE_ALL); } } + + /* grease pencil */ + if (scen->gpd) { + if (type == SCE_COPY_FULL) { + scen->gpd = gpencil_data_duplicate(scen->gpd, false); + } + else if (type == SCE_COPY_EMPTY) { + scen->gpd = NULL; + } + else { + id_us_plus((ID *)scen->gpd); + } + } return scen; } -- cgit v1.2.3