Cleanup: add trailing commas
[blender.git] / source / blender / editors / sound / sound_ops.c
index 5d39bcb77c026abbcca12366371ff59bd4d20cf7..335f84bfde9f754c194643133012ec618cb3b46c 100644 (file)
 #include "BKE_context.h"
 #include "BKE_fcurve.h"
 #include "BKE_global.h"
-#include "BKE_main.h"
-#include "BKE_report.h"
 #include "BKE_library.h"
+#include "BKE_main.h"
 #include "BKE_packedFile.h"
+#include "BKE_report.h"
 #include "BKE_scene.h"
-#include "BKE_sound.h"
 #include "BKE_sequencer.h"
+#include "BKE_sound.h"
 
 #include "RNA_access.h"
 #include "RNA_define.h"
@@ -67,7 +67,7 @@
 #include "WM_types.h"
 
 #ifdef WITH_AUDASPACE
-#  include AUD_SPECIAL_H
+#  include <AUD_Special.h>
 #endif
 
 #include "ED_sound.h"
@@ -108,7 +108,7 @@ static int sound_open_exec(bContext *C, wmOperator *op)
 
        if (sound->playback_handle == NULL) {
                if (op->customdata) MEM_freeN(op->customdata);
-               BKE_libblock_free(bmain, sound);
+               BKE_id_free(bmain, sound);
                BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
                return OPERATOR_CANCELLED;
        }
@@ -116,7 +116,7 @@ static int sound_open_exec(bContext *C, wmOperator *op)
        info = AUD_getInfo(sound->playback_handle);
 
        if (info.specs.channels == AUD_CHANNELS_INVALID) {
-               BKE_libblock_free(bmain, sound);
+               BKE_id_free(bmain, sound);
                if (op->customdata) MEM_freeN(op->customdata);
                BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
                return OPERATOR_CANCELLED;
@@ -310,6 +310,7 @@ static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Main *bmain = CTX_data_main(C);
        Scene *scene = CTX_data_scene(C);
+       struct Depsgraph *depsgraph = CTX_data_depsgraph(C);
        int oldfra = scene->r.cfra;
        int cfra;
 
@@ -317,11 +318,11 @@ static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
 
        for (cfra = (scene->r.sfra > 0) ? (scene->r.sfra - 1) : 0; cfra <= scene->r.efra + 1; cfra++) {
                scene->r.cfra = cfra;
-               BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene, scene->lay);
+               BKE_scene_graph_update_for_newframe(depsgraph, bmain);
        }
 
        scene->r.cfra = oldfra;
-       BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene, scene->lay);
+       BKE_scene_graph_update_for_newframe(depsgraph, bmain);
 
        return OPERATOR_FINISHED;
 }
@@ -419,7 +420,7 @@ static const char *snd_ext_sound[] = {
        ".mp3",
        ".ogg",
        ".wav",
-       NULL
+       NULL,
 };
 
 static bool sound_mixdown_check(bContext *UNUSED(C), wmOperator *op)
@@ -633,7 +634,7 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
        RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
 
        /* main draw call */
-       uiDefAutoButsRNA(layout, &ptr, sound_mixdown_draw_check_prop, NULL, '\0');
+       uiDefAutoButsRNA(layout, &ptr, sound_mixdown_draw_check_prop, NULL, UI_BUT_LABEL_ALIGN_NONE, false);
 }
 #endif // WITH_AUDASPACE