Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/scene.c
| Show First 20 Lines • Show All 1,559 Lines • ▼ Show 20 Lines | void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph, Main *bmain) | ||||
| /* Keep this first. */ | /* Keep this first. */ | ||||
| BLI_callback_exec(bmain, &scene->id, BLI_CB_EVT_FRAME_CHANGE_PRE); | BLI_callback_exec(bmain, &scene->id, BLI_CB_EVT_FRAME_CHANGE_PRE); | ||||
| /* Update animated image textures for particles, modifiers, gpu, etc, | /* Update animated image textures for particles, modifiers, gpu, etc, | ||||
| * call this at the start so modifiers with textures don't lag 1 frame. | * call this at the start so modifiers with textures don't lag 1 frame. | ||||
| */ | */ | ||||
| BKE_image_editors_update_frame(bmain, scene->r.cfra); | BKE_image_editors_update_frame(bmain, scene->r.cfra); | ||||
| BKE_sound_set_cfra(scene->r.cfra); | BKE_sound_set_cfra(scene->r.cfra); | ||||
| DEG_graph_relations_update(depsgraph, bmain, scene, view_layer); | DEG_graph_relations_update(depsgraph, bmain, scene, view_layer); | ||||
| /* Update animated cache files for modifiers. | |||||
| * | |||||
| * TODO(sergey): Make this a depsgraph node? | |||||
| */ | |||||
| BKE_cachefile_update_frame(bmain, | |||||
| depsgraph, | |||||
| scene, | |||||
| ctime, | |||||
| (((double)scene->r.frs_sec) / (double)scene->r.frs_sec_base)); | |||||
| #ifdef POSE_ANIMATION_WORKAROUND | #ifdef POSE_ANIMATION_WORKAROUND | ||||
| scene_armature_depsgraph_workaround(bmain, depsgraph); | scene_armature_depsgraph_workaround(bmain, depsgraph); | ||||
| #endif | #endif | ||||
| /* Update all objects: drivers, matrices, displists, etc. flags set | /* Update all objects: drivers, matrices, displists, etc. flags set | ||||
| * by depgraph or manual, no layer check here, gets correct flushed. | * by depgraph or manual, no layer check here, gets correct flushed. | ||||
| */ | */ | ||||
| DEG_evaluate_on_framechange(bmain, depsgraph, ctime); | DEG_evaluate_on_framechange(bmain, depsgraph, ctime); | ||||
| /* Update sound system animation (TODO, move to depsgraph). */ | /* Update sound system animation (TODO, move to depsgraph). */ | ||||
| ▲ Show 20 Lines • Show All 812 Lines • Show Last 20 Lines | |||||