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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-01-04 03:27:20 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-01-04 03:27:20 +0400
commitec78eb353f71341f84999f47a7222becaadb8598 (patch)
tree0ae6937bcd59f93e0cec512f7b902686cf210e22 /source/blender/freestyle/intern/system
parent699da2fb0d9012cef5e45cc1b547a01fd92dbc1c (diff)
New command-line option --debug-freestyle to enable verbose debug messages
on the console during Freestyle rendering. The debug prints are turned off by default now. Errors are still printed on the console. A patch set implementing this functionality was provided by Bastien Montagne. Many thanks! :)
Diffstat (limited to 'source/blender/freestyle/intern/system')
-rw-r--r--source/blender/freestyle/intern/system/PythonInterpreter.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h
index c6acf502e5e..6093b6e4dcd 100644
--- a/source/blender/freestyle/intern/system/PythonInterpreter.h
+++ b/source/blender/freestyle/intern/system/PythonInterpreter.h
@@ -103,9 +103,9 @@ public:
#endif
if (status != 1) {
- cout << "\nError executing Python script from PythonInterpreter::interpretFile" << endl;
- cout << "File: " << fn << endl;
- cout << "Errors: " << endl;
+ cerr << "\nError executing Python script from PythonInterpreter::interpretFile" << endl;
+ cerr << "File: " << fn << endl;
+ cerr << "Errors: " << endl;
BKE_reports_print(reports, RPT_ERROR);
return 1;
}
@@ -124,9 +124,9 @@ public:
BKE_reports_clear(reports);
if (!BPY_text_exec(_context, text, reports, false)) {
- cout << "\nError executing Python script from PythonInterpreter::interpretText" << endl;
- cout << "Name: " << name << endl;
- cout << "Errors: " << endl;
+ cerr << "\nError executing Python script from PythonInterpreter::interpretText" << endl;
+ cerr << "Name: " << name << endl;
+ cerr << "Errors: " << endl;
BKE_reports_print(reports, RPT_ERROR);
return 1;
}
@@ -173,9 +173,11 @@ private:
for (vector<string>::const_iterator it = pathnames.begin(); it != pathnames.end(); ++it) {
if (!it->empty()) {
- cout << "Adding Python path: " << *it << endl;
+ if (G.debug & G_DEBUG_FREESTYLE) {
+ cout << "Adding Python path: " << *it << endl;
+ }
cmd = "sys.path.append(r\"" + *it + "\")\n";
- txt_insert_buf(text, const_cast<char*>(cmd.c_str()));
+ txt_insert_buf(text, const_cast<char *>(cmd.c_str()));
}
}