[Bf-blender-cvs] [8319a91] master: Bugfix: Duplicating Grease Pencil datablocks wasn't doing so in a safe way
Joshua Leung
noreply at git.blender.org
Sat Nov 22 06:07:12 CET 2014
Commit: 8319a91ad4c010dc6060260b36fe5cb15c55e005
Author: Joshua Leung
Date: Sat Nov 22 01:52:28 2014 +1300
Branches: master
https://developer.blender.org/rB8319a91ad4c010dc6060260b36fe5cb15c55e005
Bugfix: Duplicating Grease Pencil datablocks wasn't doing so in a safe way
Grease Pencil data (bGPdata) is now a datablock, so it isn't safe to use
MEM_dupallocN() for copying new instances of these anymore.
===================================================================
M source/blender/blenkernel/intern/gpencil.c
===================================================================
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index e226e9d..255693f 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -286,7 +286,7 @@ bGPdata *gpencil_data_duplicate(bGPdata *src)
return NULL;
/* make a copy of the base-data */
- dst = MEM_dupallocN(src);
+ dst = BKE_libblock_copy(&src->id);
/* copy layers */
BLI_listbase_clear(&dst->layers);
More information about the Bf-blender-cvs
mailing list