diff options
author | Ton Roosendaal <ton@blender.org> | 2007-12-02 21:33:14 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2007-12-02 21:33:14 +0300 |
commit | 71e4b3ce2256a2aea80d1728066f20756f6a438b (patch) | |
tree | b3ad41be0cb5e8209e605b7dd1a43a248165b5bf /source | |
parent | 1c661f19c879ebdbaa44a67d4b4ad9d871db25d2 (diff) |
Another Proxy Armature bugfix:
- Library referencing didn't add the new local Ipo for constraints
- Proxy command didn't set the driver object in constraint ipo to be
the new proxy object.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 11 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 3c815e86116..b94e47492b2 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1037,7 +1037,7 @@ static void copy_object_pose(Object *obn, Object *ob) { bPoseChannel *chan; - copy_pose(&obn->pose, ob->pose, 1); + copy_pose(&obn->pose, ob->pose, 1); /* 1 = copy constraints */ for (chan = obn->pose->chanbase.first; chan; chan=chan->next){ bConstraint *con; @@ -1049,6 +1049,14 @@ static void copy_object_pose(Object *obn, Object *ob) ListBase targets = {NULL, NULL}; bConstraintTarget *ct; + if(con->ipo) { + IpoCurve *icu; + for(icu= con->ipo->curve.first; icu; icu= icu->next) { + if(icu->driver && icu->driver->ob==ob) + icu->driver->ob= obn; + } + } + if (cti && cti->get_constraint_targets) { cti->get_constraint_targets(con, &targets); @@ -1302,6 +1310,7 @@ void object_make_proxy(Object *ob, Object *target, Object *gob) /* skip constraints, constraintchannels, nla? */ + ob->type= target->type; ob->data= target->data; id_us_plus((ID *)ob->data); /* ensures lib data becomes LIB_EXTERN */ diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 678e2da276f..b67cdc61dc6 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7585,6 +7585,10 @@ static void expand_constraints(FileData *fd, Main *mainvar, ListBase *lb) bConstraint *curcon; for (curcon=lb->first; curcon; curcon=curcon->next) { + + if (curcon->ipo) + expand_doit(fd, mainvar, curcon->ipo); + switch (curcon->type) { case CONSTRAINT_TYPE_NULL: break; |