Revision: 38319
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38319
Author:   aligorith
Date:     2011-07-12 03:02:53 +0000 (Tue, 12 Jul 2011)
Log Message:
-----------
Bugfix #27881: Motion paths don't correctly update with pose sliding
tools

Modified Paths:
--------------
    branches/soc-2011-pepper/source/blender/blenkernel/intern/anim.c
    branches/soc-2011-pepper/source/blender/editors/armature/poseUtils.c

Modified: branches/soc-2011-pepper/source/blender/blenkernel/intern/anim.c
===================================================================
--- branches/soc-2011-pepper/source/blender/blenkernel/intern/anim.c    
2011-07-12 02:40:30 UTC (rev 38318)
+++ branches/soc-2011-pepper/source/blender/blenkernel/intern/anim.c    
2011-07-12 03:02:53 UTC (rev 38319)
@@ -173,7 +173,7 @@
        }
 
        /* avoid 0 size allocs */
-       if(avs->path_sf >= avs->path_ef) {
+       if (avs->path_sf >= avs->path_ef) {
                return NULL;
        }
 
@@ -231,6 +231,7 @@
 /* get list of motion paths to be baked for the given object
  *     - assumes the given list is ready to be used
  */
+// TODO: it would be nice in future to be able to update objects dependant on 
these bones too?
 void animviz_get_object_motionpaths(Object *ob, ListBase *targets)
 {
        MPathTarget *mpt;

Modified: branches/soc-2011-pepper/source/blender/editors/armature/poseUtils.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/armature/poseUtils.c        
2011-07-12 02:40:30 UTC (rev 38318)
+++ branches/soc-2011-pepper/source/blender/editors/armature/poseUtils.c        
2011-07-12 03:02:53 UTC (rev 38319)
@@ -247,6 +247,15 @@
                /* insert keyframes for all relevant bones in one go */
                ANIM_apply_keyingset(C, &dsources, NULL, ks, 
MODIFYKEY_MODE_INSERT, cframe);
                BLI_freelistN(&dsources);
+               
+               /* do the bone paths
+                *      - only do this if keyframes should have been added
+                *      - do not calculate unless there are paths already to 
update...
+                */
+               if (C && (ob->pose->avs.path_bakeflag & 
MOTIONPATH_BAKE_HAS_PATHS)) {
+                       //ED_pose_clear_paths(C, ob); // XXX for now, don't 
need to clear
+                       ED_pose_recalculate_paths(scene, ob);
+               }
        }
 }
 

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

Reply via email to