Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_edit.c
| Show First 20 Lines • Show All 900 Lines • ▼ Show 20 Lines | |||||
| void ED_objects_recalculate_paths(bContext *C, Scene *scene, bool current_frame_only) | void ED_objects_recalculate_paths(bContext *C, Scene *scene, 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}; | ||||
| /* loop over objects in scene */ | /* loop over objects in scene */ | ||||
| CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { | CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { | ||||
| /* set flag to force recalc, then grab path(s) from object */ | /* set flag to force recalc, then grab path(s) from object */ | ||||
| ob->avs.recalc |= ANIMVIZ_RECALC_PATHS; | ob->avs.recalc |= ANIMVIZ_RECALC_PATHS; | ||||
| animviz_get_object_motionpaths(ob, &targets); | animviz_get_object_motionpaths(ob, &targets); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 867 Lines • Show Last 20 Lines | |||||