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/stroke/Canvas.cpp
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/stroke/Canvas.cpp')
-rw-r--r--source/blender/freestyle/intern/stroke/Canvas.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/stroke/Canvas.cpp b/source/blender/freestyle/intern/stroke/Canvas.cpp
index a51c138f64e..4427192a7b0 100644
--- a/source/blender/freestyle/intern/stroke/Canvas.cpp
+++ b/source/blender/freestyle/intern/stroke/Canvas.cpp
@@ -49,6 +49,8 @@
#include "../view_map/SteerableViewMap.h"
+#include "BKE_global.h"
+
//soc #include <qimage.h>
//soc #include <QString>
@@ -334,7 +336,7 @@ void Canvas::loadMap(const char *iFileName, const char *iMapName, unsigned int i
QImage *qimg;
QImage newMap(filePath.c_str());
if (newMap.isNull()) {
- cout << "Could not load image file " << filePath << endl;
+ cerr << "Could not load image file " << filePath << endl;
return;
}
qimg = &newMap;
@@ -342,7 +344,7 @@ void Canvas::loadMap(const char *iFileName, const char *iMapName, unsigned int i
/* OCIO_TODO: support different input color space */
ImBuf *qimg = IMB_loadiffname(filePath.c_str(), 0, NULL);
if (qimg == 0) {
- cout << "Could not load image file " << filePath << endl;
+ cerr << "Could not load image file " << filePath << endl;
return;
}
@@ -455,12 +457,16 @@ void Canvas::loadMap(const char *iFileName, const char *iMapName, unsigned int i
float Canvas::readMapPixel(const char *iMapName, int level, int x, int y)
{
if (_maps.empty()) {
- cout << "readMapPixel warning: no map was loaded "<< endl;
+ if (G.debug & G_DEBUG_FREESTYLE) {
+ cout << "readMapPixel warning: no map was loaded "<< endl;
+ }
return -1;
}
mapsMap::iterator m = _maps.find(iMapName);
if (m == _maps.end()) {
- cout << "readMapPixel warning: no map was loaded with the name " << iMapName << endl;
+ if (G.debug & G_DEBUG_FREESTYLE) {
+ cout << "readMapPixel warning: no map was loaded with the name " << iMapName << endl;
+ }
return -1;
}
ImagePyramid *pyramid = (*m).second;