diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_constraint.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/armature.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 13 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 2 |
5 files changed, 15 insertions, 10 deletions
diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h index 94863e15e46..64e9636cae7 100644 --- a/source/blender/blenkernel/BKE_constraint.h +++ b/source/blender/blenkernel/BKE_constraint.h @@ -122,7 +122,7 @@ bConstraintTypeInfo *get_constraint_typeinfo(int type); void unique_constraint_name(struct bConstraint *con, struct ListBase *list); void free_constraints(struct ListBase *list); -void copy_constraints(struct ListBase *dst, const struct ListBase *src); +void copy_constraints(struct ListBase *dst, const struct ListBase *src, int do_extern); void relink_constraints(struct ListBase *list); void id_loop_constraints(struct ListBase *list, ConstraintIDFunc func, void *userdata); void free_constraint_data(struct bConstraint *con); diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 253da25b871..c5705a0f619 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -493,7 +493,7 @@ void copy_pose (bPose **dst, bPose *src, int copycon) for (pchan=outPose->chanbase.first; pchan; pchan=pchan->next) { // TODO: rename this argument... if (copycon) { - copy_constraints(&listb, &pchan->constraints); // copy_constraints NULLs listb + copy_constraints(&listb, &pchan->constraints, TRUE); // copy_constraints NULLs listb pchan->constraints= listb; pchan->path= NULL; // XXX remove this line when the new motionpaths are ready... (depreceated code) pchan->mpath= NULL; /* motion paths should not get copied yet... */ @@ -667,7 +667,7 @@ void duplicate_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *pchan_ pchan->iklinweight= pchan_from->iklinweight; /* constraints */ - copy_constraints(&pchan->constraints, &pchan_from->constraints); + copy_constraints(&pchan->constraints, &pchan_from->constraints, TRUE); /* id-properties */ if(pchan->prop) { diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index a2dbaa9d666..4f9b9435a80 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1568,9 +1568,11 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected * 1. extract constraints not from proxy (CONSTRAINT_PROXY_LOCAL) from pchan's constraints * 2. copy proxy-pchan's constraints on-to new * 3. add extracted local constraints back on top + * + * note for copy_constraints: when copying constraints, disable 'do_extern' otherwise we get the libs direct linked in this blend. */ extract_proxylocal_constraints(&proxylocal_constraints, &pchan->constraints); - copy_constraints(&pchanw.constraints, &pchanp->constraints); + copy_constraints(&pchanw.constraints, &pchanp->constraints, FALSE); addlisttolist(&pchanw.constraints, &proxylocal_constraints); /* constraints - set target ob pointer to own object */ diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 18504bab59b..a3f1cb0cb0c 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -4131,7 +4131,7 @@ static void con_extern_cb(bConstraint *con, ID **idpoin, void *userdata) } /* duplicate all of the constraints in a constraint stack */ -void copy_constraints (ListBase *dst, const ListBase *src) +void copy_constraints (ListBase *dst, const ListBase *src, int do_extern) { bConstraint *con, *srccon; @@ -4149,10 +4149,13 @@ void copy_constraints (ListBase *dst, const ListBase *src) /* perform custom copying operations if needed */ if (cti->copy_data) cti->copy_data(con, srccon); - - /* go over used ID-links for this constraint to ensure that they are valid for proxies */ - if (cti->id_looper) - cti->id_looper(con, con_extern_cb, NULL); + + /* for proxies we dont want to make extern */ + if(do_extern) { + /* go over used ID-links for this constraint to ensure that they are valid for proxies */ + if (cti->id_looper) + cti->id_looper(con, con_extern_cb, NULL); + } } } } diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index ce064a78cff..baa1caee49b 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1282,7 +1282,7 @@ Object *copy_object(Object *ob) armature_rebuild_pose(obn, obn->data); } defgroup_copy_list(&obn->defbase, &ob->defbase); - copy_constraints(&obn->constraints, &ob->constraints); + copy_constraints(&obn->constraints, &ob->constraints, TRUE); obn->mode = 0; obn->sculpt = NULL; |