Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r--source/blender/blenkernel/intern/constraint.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index d5368242baf..25b8c9ac171 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -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) */
}
}