Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/armature/pose_edit.c
| Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | |||||
| void ED_pose_recalculate_paths(bContext *C, Scene *scene, Object *ob, bool current_frame_only) | void ED_pose_recalculate_paths(bContext *C, Scene *scene, Object *ob, bool current_frame_only) | ||||
| { | { | ||||
| /* Transform doesn't always have context available to do update. */ | /* Transform doesn't always have context available to do update. */ | ||||
| if (C == NULL) { | if (C == NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | /* NOTE: Dependency graph will be evaluated at all the frames, but we first need to access some | ||||
| * nested pointers, like animation data. */ | |||||
| Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | |||||
| ListBase targets = {NULL, NULL}; | ListBase targets = {NULL, NULL}; | ||||
| bool free_depsgraph = false; | bool free_depsgraph = false; | ||||
| /* set flag to force recalc, then grab the relevant bones to target */ | /* set flag to force recalc, then grab the relevant bones to target */ | ||||
| ob->pose->avs.recalc |= ANIMVIZ_RECALC_PATHS; | ob->pose->avs.recalc |= ANIMVIZ_RECALC_PATHS; | ||||
| animviz_get_object_motionpaths(ob, &targets); | animviz_get_object_motionpaths(ob, &targets); | ||||
| /* recalculate paths, then free */ | /* recalculate paths, then free */ | ||||
| ▲ Show 20 Lines • Show All 964 Lines • Show Last 20 Lines | |||||