[Bf-blender-cvs] [040b510] master: Fix: Grease Pencil datablocks can be copied using the ID.copy() API method now

Joshua Leung noreply at git.blender.org
Tue Feb 10 11:30:40 CET 2015


Commit: 040b510df1ad1bff9858344386e6fba20de133f7
Author: Joshua Leung
Date:   Tue Feb 10 23:30:30 2015 +1300
Branches: master
https://developer.blender.org/rB040b510df1ad1bff9858344386e6fba20de133f7

Fix: Grease Pencil datablocks can be copied using the ID.copy() API method now

===================================================================

M	source/blender/blenkernel/intern/library.c

===================================================================

diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index a5691d6..a2a1b10 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -378,6 +378,7 @@ bool id_copy(ID *id, ID **newid, bool test)
 		case ID_WM:
 			return false;  /* can't be copied from here */
 		case ID_GD:
+			if (!test) *newid = (ID *)gpencil_data_duplicate((bGPdata *)id, false);
 			return false;  /* not implemented */
 		case ID_MSK:
 			if (!test) *newid = (ID *)BKE_mask_copy((Mask *)id);




More information about the Bf-blender-cvs mailing list