Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-08-17 10:46:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-17 11:32:20 +0300
commit7341ceb674b2fc5c01d4328f398516ef8f358ae5 (patch)
treef755074228baf162cf3d7cc5fcdf8d1ae3193e18 /source/blender/editors/space_script
parent397cec6a4dad6784604622ee707bb74a2e6a92a1 (diff)
Cleanup: move Python script execution into BPY_extern_run.h
This commit renames 'execute' to 'run' because: - This follows Python's "PyRun" which these functions wrap. - Execution functions can use either exec/eval modes, making naming awkward (for future API refactoring).
Diffstat (limited to 'source/blender/editors/space_script')
-rw-r--r--source/blender/editors/space_script/script_edit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index e9ed1cec228..f9d7e8371b2 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -42,7 +42,7 @@
#include "script_intern.h" // own include
#ifdef WITH_PYTHON
-# include "BPY_extern.h" /* BPY_script_exec */
+# include "BPY_extern_run.h"
#endif
static int run_pyfile_exec(bContext *C, wmOperator *op)
@@ -50,7 +50,7 @@ static int run_pyfile_exec(bContext *C, wmOperator *op)
char path[512];
RNA_string_get(op->ptr, "filepath", path);
#ifdef WITH_PYTHON
- if (BPY_execute_filepath(C, path, op->reports)) {
+ if (BPY_run_filepath(C, path, op->reports)) {
ARegion *region = CTX_wm_region(C);
ED_region_tag_redraw(region);
return OPERATOR_FINISHED;
@@ -120,8 +120,7 @@ static int script_reload_exec(bContext *C, wmOperator *op)
/* TODO, this crashes on netrender and keying sets, need to look into why
* disable for now unless running in debug mode */
WM_cursor_wait(1);
- BPY_execute_string(
- C, (const char *[]){"bpy", NULL}, "bpy.utils.load_scripts(reload_scripts=True)");
+ BPY_run_string(C, (const char *[]){"bpy", NULL}, "bpy.utils.load_scripts(reload_scripts=True)");
WM_cursor_wait(0);
WM_event_add_notifier(C, NC_WINDOW, NULL);
return OPERATOR_FINISHED;