Revision: 38603
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38603
Author:   aligorith
Date:     2011-07-22 11:53:20 +0000 (Fri, 22 Jul 2011)
Log Message:
-----------
Bugfix [#27959] Error on Paste X-Fliped pose

Paste pose no longer just does a blind "replace all properties" on
bones that it pastes on. Instead:
* when properties exist on the target already - only change the
properties in common
* when properties don't already exist - copy all properties

Modified Paths:
--------------
    branches/soc-2011-pepper/source/blender/editors/armature/editarmature.c
    branches/soc-2011-pepper/source/blender/editors/armature/poseobject.c

Modified: 
branches/soc-2011-pepper/source/blender/editors/armature/editarmature.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/armature/editarmature.c     
2011-07-22 11:21:01 UTC (rev 38602)
+++ branches/soc-2011-pepper/source/blender/editors/armature/editarmature.c     
2011-07-22 11:53:20 UTC (rev 38603)
@@ -2995,7 +2995,7 @@
        
        /* step 2a: parent children of in-between bones to newbone */
        for (chain= chains->first; chain; chain= chain->next) {
-               /* ick: we need to check if parent of each bone in chain is one 
of the bones in the */
+               /* ick: we need to check if parent of each bone in chain is one 
of the bones in the chain being merged */
                short found= 0;
                for (ebo= chain->data; ebo; ebo= ebo->parent) {
                        

Modified: branches/soc-2011-pepper/source/blender/editors/armature/poseobject.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/armature/poseobject.c       
2011-07-22 11:21:01 UTC (rev 38602)
+++ branches/soc-2011-pepper/source/blender/editors/armature/poseobject.c       
2011-07-22 11:53:20 UTC (rev 38603)
@@ -1107,21 +1107,19 @@
                                        }
                                }
                                
-                               /* ID properties 
-                                *      - only free the existing properties if 
the channel we're copying from has them
-                                *        NOTE: this means that if the pose 
depends on some pchan property, the pose may not be ok,
-                                *                  but this is better than 
loosing all the setting you've painstakingly added...
-                                */
+                               /* ID properties */
                                if (chan->prop) {
-                                       /* free the old properties since we 
want to replace them now */
                                        if (pchan->prop) {
-                                               IDP_FreeProperty(pchan->prop);
-                                               MEM_freeN(pchan->prop);
-                                               pchan->prop= NULL;
+                                               /* if we have existing 
properties on a bone, just copy over the values of 
+                                                * matching properties (i.e. 
ones which will have some impact) on to the 
+                                                * target instead of just 
blinding replacing all [
+                                                */
+                                               
IDP_SyncGroupValues(pchan->prop, chan->prop);
                                        }
-                                       
-                                       /* now copy over the new copy of the 
properties */
-                                       pchan->prop= 
IDP_CopyProperty(chan->prop);      
+                                       else {
+                                               /* no existing properties, so 
assume that we want copies too? */
+                                               pchan->prop= 
IDP_CopyProperty(chan->prop);      
+                                       }
                                }
                                
                                /* keyframing tagging */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to