Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sound/sound_ops.c
| Show First 20 Lines • Show All 267 Lines • ▼ Show 20 Lines | static void sound_update_animation_flags(Scene *scene) | ||||
| } | } | ||||
| else { | else { | ||||
| scene->audio.flag &= ~AUDIO_VOLUME_ANIMATED; | scene->audio.flag &= ~AUDIO_VOLUME_ANIMATED; | ||||
| } | } | ||||
| } | } | ||||
| static int sound_update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op)) | static int sound_update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | |||||
| BKE_main_id_tag_idcode(CTX_data_main(C), ID_SCE, LIB_TAG_DOIT, false); | BKE_main_id_tag_idcode(CTX_data_main(C), ID_SCE, LIB_TAG_DOIT, false); | ||||
| sound_update_animation_flags(CTX_data_scene(C)); | sound_update_animation_flags(CTX_data_scene(C)); | ||||
| DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); | |||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| static void SOUND_OT_update_animation_flags(wmOperatorType *ot) | static void SOUND_OT_update_animation_flags(wmOperatorType *ot) | ||||
| { | { | ||||
| /* | /* | ||||
| * This operator is needed to set a correct state of the sound animation | * This operator is needed to set a correct state of the sound animation | ||||
| * System. Unfortunately there's no really correct place to call the exec | * System. Unfortunately there's no really correct place to call the exec | ||||
| ▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | #ifdef WITH_AUDASPACE | ||||
| int bitrate, accuracy; | int bitrate, accuracy; | ||||
| AUD_DeviceSpecs specs; | AUD_DeviceSpecs specs; | ||||
| AUD_Container container; | AUD_Container container; | ||||
| AUD_Codec codec; | AUD_Codec codec; | ||||
| const char *result; | const char *result; | ||||
| sound_bake_animation_exec(C, op); | sound_bake_animation_exec(C, op); | ||||
sergey: This doesn't make sense to me. `DEG_get_evaluated_scene()` simply returns pointer, which stays… | |||||
Done Inline ActionsSorry, I should tell, that I am unsure about this. ISS: Sorry, I should tell, that I am unsure about this. | |||||
| RNA_string_get(op->ptr, "filepath", path); | RNA_string_get(op->ptr, "filepath", path); | ||||
| bitrate = RNA_int_get(op->ptr, "bitrate") * 1000; | bitrate = RNA_int_get(op->ptr, "bitrate") * 1000; | ||||
| accuracy = RNA_int_get(op->ptr, "accuracy"); | accuracy = RNA_int_get(op->ptr, "accuracy"); | ||||
| specs.format = RNA_enum_get(op->ptr, "format"); | specs.format = RNA_enum_get(op->ptr, "format"); | ||||
| container = RNA_enum_get(op->ptr, "container"); | container = RNA_enum_get(op->ptr, "container"); | ||||
| codec = RNA_enum_get(op->ptr, "codec"); | codec = RNA_enum_get(op->ptr, "codec"); | ||||
| split = RNA_boolean_get(op->ptr, "split_channels"); | split = RNA_boolean_get(op->ptr, "split_channels"); | ||||
| specs.channels = scene_eval->r.ffcodecdata.audio_channels; | specs.channels = scene_eval->r.ffcodecdata.audio_channels; | ||||
| ▲ Show 20 Lines • Show All 518 Lines • Show Last 20 Lines | |||||
This doesn't make sense to me. DEG_get_evaluated_scene() simply returns pointer, which stays the same during lifetime of dependency graph.
So either this part is not needed, or it is CTX_data_ensure_evaluated_depsgraph which is to be called after edits which happens in sound_bake_animation_exec().