diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-05 14:32:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-05 14:32:27 +0300 |
commit | 29e11e3ef4fc4b36347347663d73a4762f116523 (patch) | |
tree | 68f0c0290dfbcf24de366cf0d0286ead1c86afe1 /source/blender | |
parent | 061f258d690a12fbf1ff991009d1eae8d6b35b5f (diff) |
bugfix for proxying linked objects & action constraints, reference to linked actions were being lost.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 7a29011a391..9624346f9e2 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -1918,6 +1918,14 @@ static void actcon_new_data (void *cdata) data->type = 20; } +/* only for setting the ID as extern */ +static void actcon_copy_data (bConstraint *con, bConstraint *srccon) +{ + bActionConstraint *src= srccon->data; + bActionConstraint *dst= con->data; + id_lib_extern((ID *)dst->act); /* would be better solved with something like modifiers_foreachIDLink */ +} + static int actcon_get_tars (bConstraint *con, ListBase *list) { if (con && list) { @@ -2057,7 +2065,7 @@ static bConstraintTypeInfo CTI_ACTION = { "bActionConstraint", /* struct name */ NULL, /* free data */ actcon_relink, /* relink data */ - NULL, /* copy data */ + actcon_copy_data, /* copy data */ actcon_new_data, /* new data */ actcon_get_tars, /* get constraint targets */ actcon_flush_tars, /* flush constraint targets */ |