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/freestyle/intern
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/freestyle/intern')
-rw-r--r--source/blender/freestyle/intern/system/PythonInterpreter.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h
index bae69aa0a42..e2022c1de85 100644
--- a/source/blender/freestyle/intern/system/PythonInterpreter.h
+++ b/source/blender/freestyle/intern/system/PythonInterpreter.h
@@ -42,7 +42,7 @@ extern "C" {
#include "BKE_report.h"
#include "BKE_text.h"
-#include "BPY_extern.h"
+#include "BPY_extern_run.h"
#include "bpy_capi_utils.h"
@@ -68,12 +68,12 @@ class PythonInterpreter : public Interpreter {
BKE_reports_clear(reports);
char *fn = const_cast<char *>(filename.c_str());
#if 0
- bool ok = BPY_execute_filepath(_context, fn, reports);
+ bool ok = BPY_run_filepath(_context, fn, reports);
#else
bool ok;
Text *text = BKE_text_load(&_freestyle_bmain, fn, G_MAIN->name);
if (text) {
- ok = BPY_execute_text(_context, text, reports, false);
+ ok = BPY_run_text(_context, text, reports, false);
BKE_id_delete(&_freestyle_bmain, text);
}
else {
@@ -102,7 +102,7 @@ class PythonInterpreter : public Interpreter {
BKE_reports_clear(reports);
- if (!BPY_execute_string(_context, NULL, str.c_str())) {
+ if (!BPY_run_string(_context, NULL, str.c_str())) {
BPy_errors_to_report(reports);
cerr << "\nError executing Python script from PythonInterpreter::interpretString" << endl;
cerr << "Name: " << name << endl;
@@ -122,7 +122,7 @@ class PythonInterpreter : public Interpreter {
BKE_reports_clear(reports);
- if (!BPY_execute_text(_context, text, reports, false)) {
+ if (!BPY_run_text(_context, text, reports, false)) {
cerr << "\nError executing Python script from PythonInterpreter::interpretText" << endl;
cerr << "Name: " << name << endl;
cerr << "Errors: " << endl;