diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/creator/creator.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 365d358b840..df09b8d26ef 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -796,6 +796,7 @@ static int run_python(int argc, char **argv, void *data) /* XXX, temp setting the WM is ugly, splash also does this :S */ wmWindowManager *wm= CTX_wm_manager(C); wmWindow *prevwin= CTX_wm_window(C); + Scene *prevscene= CTX_data_scene(C); if(wm->windows.first) { CTX_wm_window_set(C, wm->windows.first); @@ -808,6 +809,9 @@ static int run_python(int argc, char **argv, void *data) fprintf(stderr, "Python script \"%s\" running with missing context data.\n", argv[1]); BPY_run_python_script(C, filename, NULL, NULL); // use reports? } + + CTX_data_scene_set(C, prevscene); + return 1; } else { printf("\nError: you must specify a Python script after '-P '.\n"); |