=ID Property update=
[blender-staging.git] / source / blender / blenkernel / intern / constraint.c
index d5368242bafe8885e82bd950901b623a8845007d..25b8c9ac171805163b4f279d956d7f24d8b747ca 100644 (file)
@@ -162,14 +162,21 @@ void clone_constraint_channels (ListBase *dst, ListBase *src)
 
 void copy_constraints (ListBase *dst, ListBase *src)
 {
-       bConstraint *con;
+       bConstraint *con, *srccon;
        
        dst->first= dst->last= NULL;
        
        duplicatelist (dst, src);
        
-       for (con = dst->first; con; con=con->next) {
+       for (con = dst->first, srccon=src->first; con; srccon=srccon->next, con=con->next) {
                con->data = MEM_dupallocN (con->data);
+               if (con->type == CONSTRAINT_TYPE_PYTHON) {
+                       bPythonConstraint *pycon = (bPythonConstraint*) con->data;
+                       bPythonConstraint *opycon = (bPythonConstraint*) srccon->data;
+
+                       pycon->prop = IDP_CopyProperty(opycon->prop);
+               }
+               /* removed a whole lot of useless code here (ton) */
        }
 }