From 98c8094e3a52edaec87bb9f61809e9ae573df430 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 27 Jul 2018 16:41:18 +1000 Subject: [PATCH 1/2] Correct arguments for callback --- source/blender/editors/sound/sound_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index c3ed2a7b9c2..b605bd6e1a7 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -481,7 +481,7 @@ static int sound_mixdown_invoke(bContext *C, wmOperator *op, const wmEvent *even #ifdef WITH_AUDASPACE -static bool sound_mixdown_draw_check_prop(PointerRNA *UNUSED(ptr), PropertyRNA *prop) +static bool sound_mixdown_draw_check_prop(PointerRNA *UNUSED(ptr), PropertyRNA *prop, void *UNUSED(user_data)) { const char *prop_id = RNA_property_identifier(prop); return !(STREQ(prop_id, "filepath") || From 3e2dfc6db8e01ffa5e12a8e9b300ef6509a06552 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 27 Jul 2018 16:49:41 +1000 Subject: [PATCH 2/2] Fix T55991: Python ignores scene switch argument --- source/creator/creator_args.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index b78e76f6ba3..22301bd62f5 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -60,6 +60,8 @@ #include "BKE_sound.h" #include "BKE_image.h" +#include "DNA_screen_types.h" + #include "DEG_depsgraph.h" #ifdef WITH_FFMPEG @@ -1588,6 +1590,16 @@ static int arg_handle_scene_set(int argc, const char **argv, void *data) Scene *scene = BKE_scene_set_name(CTX_data_main(C), argv[1]); if (scene) { CTX_data_scene_set(C, scene); + + /* Set the scene of the first window, see: T55991, + * otherwise scrips that run later won't get this scene back from the context. */ + wmWindow *win = CTX_wm_window(C); + if (win == NULL) { + win = CTX_wm_manager(C)->windows.first; + } + if (win != NULL) { + win->screen->scene = scene; + } } return 1; }