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/view_map/SilhouetteGeomEngine.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/view_map/SilhouetteGeomEngine.cpp')
-rw-r--r--source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
index 06cbd85d863..2de6be4c68a 100644
--- a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
+++ b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
@@ -38,6 +38,8 @@
#include "../geometry/GeomUtils.h"
+#include "BKE_global.h"
+
using namespace std;
Vec3r SilhouetteGeomEngine::_Viewpoint = Vec3r(0, 0, 0);
@@ -196,9 +198,11 @@ real SilhouetteGeomEngine::ImageToWorldParameter(FEdge *fe, real t)
GeomUtils::fromWorldToCamera(Bw, Bc, _modelViewMatrix);
Vec3r ABc = Bc - Ac;
#if 0
- cout << "Ac " << Ac << endl;
- cout << "Bc " << Bc << endl;
- cout << "ABc " << ABc << endl;
+ if (G.debug & G_DEBUG_FREESTYLE) {
+ cout << "Ac " << Ac << endl;
+ cout << "Bc " << Bc << endl;
+ cout << "ABc " << ABc << endl;
+ }
#endif
Vec3r Ai = (fe)->vertexA()->point2D();
Vec3r Bi = (fe)->vertexB()->point2D();
@@ -295,10 +299,13 @@ iter:
}
}
#if 0
- printf("SilhouetteGeomEngine::ImageToWorldParameter(): #iters = %d, dist = %e\n", i, dist);
+ if (G.debug & G_DEBUG_FREESTYLE) {
+ printf("SilhouetteGeomEngine::ImageToWorldParameter(): #iters = %d, dist = %e\n", i, dist);
+ }
#endif
- if (i == max_iters)
+ if (i == max_iters && G.debug & G_DEBUG_FREESTYLE) {
printf("SilhouetteGeomEngine::ImageToWorldParameter(): reached to max_iters (dist = %e)\n", dist);
+ }
}
return T;