From ec78eb353f71341f84999f47a7222becaadb8598 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Thu, 3 Jan 2013 23:27:20 +0000 Subject: 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! :) --- source/blender/freestyle/intern/view_map/SteerableViewMap.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source/blender/freestyle/intern/view_map/SteerableViewMap.cpp') 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; -- cgit v1.2.3