[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24807] trunk/blender/source/blender/ blenkernel/intern/action.c: copying a pose didnt copy its ID props, both poses would reference the same pointer ( made proxy on objects with ID-prop pose channels fail)

Campbell Barton ideasman42 at gmail.com
Mon Nov 23 14:35:21 CET 2009


Revision: 24807
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24807
Author:   campbellbarton
Date:     2009-11-23 14:35:21 +0100 (Mon, 23 Nov 2009)

Log Message:
-----------
copying a pose didnt copy its ID props, both poses would reference the same pointer (made proxy on objects with ID-prop pose channels fail)

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/action.c

Modified: trunk/blender/source/blender/blenkernel/intern/action.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/action.c	2009-11-23 13:19:30 UTC (rev 24806)
+++ trunk/blender/source/blender/blenkernel/intern/action.c	2009-11-23 13:35:21 UTC (rev 24807)
@@ -518,17 +518,22 @@
 	outPose->ikdata = NULL;
 	outPose->ikparam = MEM_dupallocN(src->ikparam);
 	
-	// TODO: rename this argument...
-	if (copycon) {
-		for (pchan=outPose->chanbase.first; pchan; pchan=pchan->next) {
+	for (pchan=outPose->chanbase.first; pchan; pchan=pchan->next) {
+		// TODO: rename this argument...
+		if (copycon) {
 			copy_constraints(&listb, &pchan->constraints);  // copy_constraints NULLs listb
 			pchan->constraints= listb;
 			pchan->path= NULL;
 		}
 		
-		/* for now, duplicate Bone Groups too when doing this */
+		if(pchan->prop) {
+			pchan->prop= IDP_CopyProperty(pchan->prop);
+		}
+	}
+
+	/* for now, duplicate Bone Groups too when doing this */
+	if(copycon)
 		BLI_duplicatelist(&outPose->agroups, &src->agroups);
-	}
 	
 	*dst=outPose;
 }





More information about the Bf-blender-cvs mailing list