[Bf-blender-cvs] [f425de9] master: Bugfix T42549: Grease pencil layers are not scene-specific for "full copy scenes"
Joshua Leung
noreply at git.blender.org
Sat Nov 22 06:07:14 CET 2014
Commit: f425de9341753addf39b12aac9ba16c6cba4f7ee
Author: Joshua Leung
Date: Sat Nov 22 18:04:08 2014 +1300
Branches: master
https://developer.blender.org/rBf425de9341753addf39b12aac9ba16c6cba4f7ee
Bugfix T42549: Grease pencil layers are not scene-specific for "full copy scenes"
===================================================================
M source/blender/blenkernel/intern/scene.c
===================================================================
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 168fa9a..b0a94cd 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;
}
More information about the Bf-blender-cvs
mailing list