Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sound/sound_ops.c
| Show First 20 Lines • Show All 299 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /* ******************************************************* */ | /* ******************************************************* */ | ||||
| static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op)) | static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| { | { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| struct Depsgraph *depsgraph = CTX_data_depsgraph(C); | /* NOTE: We will be forefully evaluating dependency graph at every frame, so no need to ensure | ||||
| * current scene state is evaluated as it will be lost anyway. */ | |||||
| struct Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); | |||||
| int oldfra = scene->r.cfra; | int oldfra = scene->r.cfra; | ||||
| int cfra; | int cfra; | ||||
| sound_update_animation_flags_exec(C, NULL); | sound_update_animation_flags_exec(C, NULL); | ||||
| for (cfra = (scene->r.sfra > 0) ? (scene->r.sfra - 1) : 0; cfra <= scene->r.efra + 1; cfra++) { | for (cfra = (scene->r.sfra > 0) ? (scene->r.sfra - 1) : 0; cfra <= scene->r.efra + 1; cfra++) { | ||||
| scene->r.cfra = cfra; | scene->r.cfra = cfra; | ||||
| BKE_scene_graph_update_for_newframe(depsgraph, bmain); | BKE_scene_graph_update_for_newframe(depsgraph, bmain); | ||||
| Show All 21 Lines | |||||
| /******************** mixdown operator ********************/ | /******************** mixdown operator ********************/ | ||||
| static int sound_mixdown_exec(bContext *C, wmOperator *op) | static int sound_mixdown_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| #ifdef WITH_AUDASPACE | #ifdef WITH_AUDASPACE | ||||
| char path[FILE_MAX]; | char path[FILE_MAX]; | ||||
| char filename[FILE_MAX]; | char filename[FILE_MAX]; | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| Scene *scene_eval = DEG_get_evaluated_scene(depsgraph); | Scene *scene_eval = DEG_get_evaluated_scene(depsgraph); | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| int split; | int split; | ||||
| int bitrate, accuracy; | int bitrate, accuracy; | ||||
| AUD_DeviceSpecs specs; | AUD_DeviceSpecs specs; | ||||
| AUD_Container container; | AUD_Container container; | ||||
| AUD_Codec codec; | AUD_Codec codec; | ||||
| ▲ Show 20 Lines • Show All 530 Lines • Show Last 20 Lines | |||||