diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-01-04 03:27:20 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-01-04 03:27:20 +0400 |
commit | ec78eb353f71341f84999f47a7222becaadb8598 (patch) | |
tree | 0ae6937bcd59f93e0cec512f7b902686cf210e22 /source/blender/freestyle/intern/view_map/SteerableViewMap.cpp | |
parent | 699da2fb0d9012cef5e45cc1b547a01fd92dbc1c (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/view_map/SteerableViewMap.cpp')
-rw-r--r-- | source/blender/freestyle/intern/view_map/SteerableViewMap.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp index e39181e335d..120ef46667b 100644 --- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp +++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp @@ -45,6 +45,8 @@ #include "../image/ImagePyramid.h" #include "../image/Image.h" +#include "BKE_global.h" + extern "C" { #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" @@ -206,9 +208,11 @@ void SteerableViewMap::buildImagesPyramids(GrayImage **steerableBases, bool copy float SteerableViewMap::readSteerableViewMapPixel(unsigned iOrientation, int iLevel, int x, int y) { ImagePyramid *pyramid = _imagesPyramids[iOrientation]; - if (pyramid == 0) { - cout << "Warning: this steerable ViewMap level doesn't exist" << endl; - return 0; + if (!pyramid) { + if (G.debug & G_DEBUG_FREESTYLE) { + cout << "Warning: this steerable ViewMap level doesn't exist" << endl; + } + return 0.0f; } if ((x < 0) || (x >= pyramid->width()) || (y < 0) || (y >= pyramid->height())) return 0; |