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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user