From 96b646c68dd9f62f7655b7eee902bddb908e12a5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 5 Jan 2011 02:08:54 +0000 Subject: edits for BPY_extern.h functions, no functional changes - remove unused code. - BPY_run_python_script() split in 2, BPY_filepath_exec, BPY_text_exec - renamed funcs. --- source/blender/windowmanager/intern/wm_files.c | 10 +++++----- source/blender/windowmanager/intern/wm_init_exit.c | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 5403699a0b3..b5601f60bee 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -316,8 +316,8 @@ void WM_read_file(bContext *C, const char *name, ReportList *reports) #ifdef WITH_PYTHON /* run any texts that were loaded in and flagged as modules */ - BPY_reset_driver(); - BPY_load_user_modules(C); + BPY_driver_reset(); + BPY_modules_load_user(C); #endif CTX_wm_window_set(C, NULL); /* exits queues */ @@ -415,10 +415,10 @@ int WM_read_homefile(bContext *C, wmOperator *op) #ifdef WITH_PYTHON if(CTX_py_init_get(C)) { /* sync addons, these may have changed from the defaults */ - BPY_eval_string(C, "__import__('bpy').utils.addon_reset_all()"); + BPY_string_exec(C, "__import__('bpy').utils.addon_reset_all()"); - BPY_reset_driver(); - BPY_load_user_modules(C); + BPY_driver_reset(); + BPY_modules_load_user(C); } #endif diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 181ae62af17..7eefacca2c6 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -144,11 +144,11 @@ void WM_init(bContext *C, int argc, char **argv) * Will try fix when the crash can be repeated. - campbell. */ #ifdef WITH_PYTHON - BPY_set_context(C); /* necessary evil */ - BPY_start_python(argc, argv); + BPY_context_set(C); /* necessary evil */ + BPY_python_start(argc, argv); - BPY_reset_driver(); - BPY_load_user_modules(C); + BPY_driver_reset(); + BPY_modules_load_user(C); #else (void)argc; /* unused */ (void)argv; /* unused */ @@ -412,7 +412,7 @@ void WM_exit(bContext *C) /* Update for blender 2.5, move after free_blender because blender now holds references to PyObject's * so decref'ing them after python ends causes bad problems every time * the pyDriver bug can be fixed if it happens again we can deal with it then */ - BPY_end_python(); + BPY_python_end(); #endif if (!G.background) { @@ -435,7 +435,7 @@ void WM_exit(bContext *C) UI_exit(); BKE_userdef_free(); - RNA_exit(); /* should be after BPY_end_python so struct python slots are cleared */ + RNA_exit(); /* should be after BPY_python_end so struct python slots are cleared */ wm_ghost_exit(); -- cgit v1.2.3