Motion Paths are now recalculated again after transforms (with autokeying and around-current frame displays enabled)

This commit is contained in:
Joshua Leung 2010-01-19 21:44:22 +00:00
parent 886a5bca08
commit 7165008b35

@ -4708,8 +4708,8 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o
/* do the bone paths
* NOTE: only do this when there is context info
*/
if (C && (arm->pathflag & ARM_PATH_ACFRA)) {
//pose_clear_paths(ob); // XXX for now, don't need to clear
if (C && (ob->pose->avs.path_type == MOTIONPATH_TYPE_ACFRA)) {
//ED_pose_clear_paths(C, ob); // XXX for now, don't need to clear
ED_pose_recalculate_paths(C, scene, ob);
}
}
@ -4963,7 +4963,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
;
}
else { /* Objects */
int i;
int i, recalcObPaths=0;
for (i = 0; i < t->total; i++) {
TransData *td = t->data + i;
@ -4996,8 +4996,20 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
DAG_id_flush_update(&ob->id, OB_RECALC_OB);
/* Set autokey if necessary */
if (!cancelled)
if (!cancelled) {
autokeyframe_ob_cb_func(C, t->scene, (View3D *)t->view, ob, t->mode);
if (ob->avs.path_type == MOTIONPATH_TYPE_ACFRA)
recalcObPaths= 1;
}
}
/* recalculate motion paths for objects (if necessary)
* NOTE: only do this when there is context info
*/
if (C && recalcObPaths) {
//ED_objects_clear_paths(C); // XXX for now, don't need to clear
ED_objects_recalculate_paths(C, t->scene);
}
}