[Bf-blender-cvs] [c3eab0e] input_method_editor: Bugfix: Duplicating Grease Pencil datablocks wasn't doing so in a safe way
Joshua Leung
noreply at git.blender.org
Mon Nov 24 00:45:29 CET 2014
Commit: c3eab0e2f4c8b6b1b2c62727358f936d2147604f
Author: Joshua Leung
Date: Sat Nov 22 01:52:28 2014 +1300
Branches: input_method_editor
https://developer.blender.org/rBc3eab0e2f4c8b6b1b2c62727358f936d2147604f
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