forked from bartvdbraak/blender
== Proxies + Bone Groups ==
Bone Groups are now always copied from the source armature. This does mean that it isn't possible to have 'local' bone groups as for constraints, but it is better than losing bone groups from the original.
This commit is contained in:
parent
f50eb9c0c9
commit
e3d0508882
@ -295,7 +295,7 @@ void copy_pose(bPose **dst, bPose *src, int copycon)
|
||||
|
||||
outPose= MEM_callocN(sizeof(bPose), "pose");
|
||||
|
||||
duplicatelist (&outPose->chanbase, &src->chanbase);
|
||||
duplicatelist(&outPose->chanbase, &src->chanbase);
|
||||
|
||||
if (copycon) {
|
||||
for (pchan=outPose->chanbase.first; pchan; pchan=pchan->next) {
|
||||
@ -314,11 +314,11 @@ void free_pose_channels(bPose *pose)
|
||||
|
||||
if (pose->chanbase.first) {
|
||||
for (pchan = pose->chanbase.first; pchan; pchan=pchan->next){
|
||||
if(pchan->path)
|
||||
if (pchan->path)
|
||||
MEM_freeN(pchan->path);
|
||||
free_constraints(&pchan->constraints);
|
||||
}
|
||||
BLI_freelistN (&pose->chanbase);
|
||||
BLI_freelistN(&pose->chanbase);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1389,18 +1389,26 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
|
||||
bPoseChannel *pchan, *pchanp, pchanw;
|
||||
bConstraint *con;
|
||||
|
||||
if(frompose==NULL) return;
|
||||
if (frompose==NULL) return;
|
||||
|
||||
/* exception, armature local layer should be proxied too */
|
||||
if(pose->proxy_layer)
|
||||
if (pose->proxy_layer)
|
||||
((bArmature *)ob->data)->layer= pose->proxy_layer;
|
||||
|
||||
/* clear all transformation values from library */
|
||||
rest_pose(frompose);
|
||||
|
||||
pchan= pose->chanbase.first;
|
||||
for(; pchan; pchan= pchan->next) {
|
||||
if(pchan->bone->layer & layer_protected) {
|
||||
/* copy over all of the proxy's bone groups */
|
||||
/* TODO for later - implement 'local' bone groups as for constraints
|
||||
* Note: this isn't trivial, as bones reference groups by index not by pointer,
|
||||
* so syncing things correctly needs careful attention
|
||||
*/
|
||||
BLI_freelistN(&pose->agroups);
|
||||
duplicatelist(&pose->agroups, &frompose->agroups);
|
||||
pose->active_group= frompose->active_group;
|
||||
|
||||
for (pchan= pose->chanbase.first; pchan; pchan= pchan->next) {
|
||||
if (pchan->bone->layer & layer_protected) {
|
||||
ListBase proxylocal_constraints = {NULL, NULL};
|
||||
pchanp= get_pose_channel(frompose, pchan->name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user