From 29e11e3ef4fc4b36347347663d73a4762f116523 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 5 Feb 2010 11:32:27 +0000 Subject: [PATCH] bugfix for proxying linked objects & action constraints, reference to linked actions were being lost. --- source/blender/blenkernel/intern/constraint.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 */