Revision: 26138
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26138
Author:   blendix
Date:     2010-01-20 13:20:34 +0100 (Wed, 20 Jan 2010)

Log Message:
-----------
Proxy Fix: drivers are now copied on proxy synchronization. Also for bones
on non-proxy protected layers, not sure if these should be done or not, it
depends a bit on preference.

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

Modified: trunk/blender/source/blender/blenkernel/intern/armature.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/armature.c   2010-01-20 
11:32:11 UTC (rev 26137)
+++ trunk/blender/source/blender/blenkernel/intern/armature.c   2010-01-20 
12:20:34 UTC (rev 26138)
@@ -61,6 +61,7 @@
 #include "BKE_depsgraph.h"
 #include "BKE_DerivedMesh.h"
 #include "BKE_displist.h"
+#include "BKE_fcurve.h"
 #include "BKE_global.h"
 #include "BKE_idprop.h"
 #include "BKE_library.h"
@@ -1480,6 +1481,7 @@
        bPose *pose= ob->pose, *frompose= from->pose;
        bPoseChannel *pchan, *pchanp, pchanw;
        bConstraint *con;
+       AnimData *adt, *fromadt;
        int error = 0;
        
        if (frompose==NULL) return;
@@ -1571,6 +1573,15 @@
                        pchan->custom= pchanp->custom;
                }
        }
+
+       /* copy drivers */
+       adt= BKE_animdata_from_id(&ob->id);
+       fromadt= BKE_animdata_from_id(&from->id);
+       if(!adt)
+               adt= BKE_id_add_animdata(&ob->id);
+
+       free_fcurves(&adt->drivers);
+       copy_fcurves(&adt->drivers, &fromadt->drivers);
 }
 
 static int rebuild_pose_bone(bPose *pose, Bone *bone, bPoseChannel *parchan, 
int counter)


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to