diff options
author | Joshua Leung <aligorith@gmail.com> | 2014-11-22 08:04:08 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2014-11-22 08:05:47 +0300 |
commit | f425de9341753addf39b12aac9ba16c6cba4f7ee (patch) | |
tree | b0c1711a003146a86d8b8f158b7131c36b56b3fd /source | |
parent | 731f3476b7b4660adc446bfb1c6061c20a7d0c1b (diff) |
Bugfix T42549: Grease pencil layers are not scene-specific for "full copy scenes"
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 14 |
1 files changed, 14 insertions, 0 deletions
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; } |