diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-23 16:35:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-23 16:35:21 +0300 |
commit | 1baaa0134c25fc4b59049281dcf2597b4e05e167 (patch) | |
tree | d94b26ef2b9b5bcdabd1aede45021a89135652f5 /source/blender/blenkernel/intern/action.c | |
parent | fbeca721a2efa3ffd91aa504a182f7f6b704b3cc (diff) |
copying a pose didnt copy its ID props, both poses would reference the same pointer (made proxy on objects with ID-prop pose channels fail)
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 1e5cb364a95..af3c4719e32 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -518,17 +518,22 @@ void copy_pose (bPose **dst, bPose *src, int copycon) outPose->ikdata = NULL; outPose->ikparam = MEM_dupallocN(src->ikparam); - // TODO: rename this argument... - if (copycon) { - for (pchan=outPose->chanbase.first; pchan; pchan=pchan->next) { + for (pchan=outPose->chanbase.first; pchan; pchan=pchan->next) { + // TODO: rename this argument... + if (copycon) { copy_constraints(&listb, &pchan->constraints); // copy_constraints NULLs listb pchan->constraints= listb; pchan->path= NULL; } - /* for now, duplicate Bone Groups too when doing this */ - BLI_duplicatelist(&outPose->agroups, &src->agroups); + if(pchan->prop) { + pchan->prop= IDP_CopyProperty(pchan->prop); + } } + + /* for now, duplicate Bone Groups too when doing this */ + if(copycon) + BLI_duplicatelist(&outPose->agroups, &src->agroups); *dst=outPose; } |