Bugfix: "exploding candy"

Missed a case where I converted set_constraint_target incorrectly. This resulted in mancandy "exploding" on loading proxy-linked mancandy files.
This commit is contained in:
Joshua Leung
2007-10-30 05:22:46 +00:00
parent ef9ead78f2
commit 20905354fc

View File

@@ -1264,8 +1264,8 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
/* constraints, set target ob pointer to own object */
copy_constraints(&pchanw.constraints, &pchanp->constraints);
for(con= pchanw.constraints.first; con; con= con->next) {
for (con= pchanw.constraints.first; con; con= con->next) {
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -1274,10 +1274,8 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
cti->get_constraint_targets(con, &targets);
for (ct= targets.first; ct; ct= ct->next) {
if (ct->tar == from) {
if (ct->tar == from)
ct->tar = ob;
strcpy(ct->subtarget, "");
}
}
if (cti->flush_constraint_targets)
@@ -1286,7 +1284,7 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
}
/* free stuff from current channel */
if(pchan->path) MEM_freeN(pchan->path);
if (pchan->path) MEM_freeN(pchan->path);
free_constraints(&pchan->constraints);
/* the final copy */