diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-12-31 13:15:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-12-31 13:20:41 +0300 |
commit | 0ffc603553bb6a5dd3ce96e88bc9be34356fc0cf (patch) | |
tree | 1415890bf433ac933fee88fb80e37c322e26e281 /source/blender/freestyle/intern/system | |
parent | 16e1bbf1dbbefde14533b0de5b68ae3ac269e05c (diff) |
Cleanup: Py API naming
Use BPY_execute_* prefix for all Python execution commands
Diffstat (limited to 'source/blender/freestyle/intern/system')
-rw-r--r-- | source/blender/freestyle/intern/system/PythonInterpreter.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h index ddb79b2df0b..5403ec6b13b 100644 --- a/source/blender/freestyle/intern/system/PythonInterpreter.h +++ b/source/blender/freestyle/intern/system/PythonInterpreter.h @@ -78,22 +78,22 @@ public: BKE_reports_clear(reports); char *fn = const_cast<char*>(filename.c_str()); #if 0 - int status = BPY_filepath_exec(_context, fn, reports); + bool ok = BPY_execute_filepath(_context, fn, reports); #else - int status; + bool ok; Text *text = BKE_text_load(&_freestyle_bmain, fn, G.main->name); if (text) { - status = BPY_text_exec(_context, text, reports, false); + ok = BPY_execute_text(_context, text, reports, false); BKE_text_unlink(&_freestyle_bmain, text); BKE_libblock_free(&_freestyle_bmain, text); } else { BKE_reportf(reports, RPT_ERROR, "Cannot open file: %s", fn); - status = 0; + ok = false; } #endif - if (status != 1) { + if (ok == false) { cerr << "\nError executing Python script from PythonInterpreter::interpretFile" << endl; cerr << "File: " << fn << endl; cerr << "Errors: " << endl; @@ -113,7 +113,7 @@ public: BKE_reports_clear(reports); - if (BPY_string_exec(_context, str.c_str()) != 0) { + if (!BPY_execute_string(_context, str.c_str())) { BPy_errors_to_report(reports); cerr << "\nError executing Python script from PythonInterpreter::interpretString" << endl; cerr << "Name: " << name << endl; @@ -133,7 +133,7 @@ public: BKE_reports_clear(reports); - if (!BPY_text_exec(_context, text, reports, false)) { + if (!BPY_execute_text(_context, text, reports, false)) { cerr << "\nError executing Python script from PythonInterpreter::interpretText" << endl; cerr << "Name: " << name << endl; cerr << "Errors: " << endl; |