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:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-12-11 01:06:27 +0300
committerMaxime Curioni <maxime.curioni@gmail.com>2008-12-11 01:06:27 +0300
commit2f460b448b29f17e9c1f6aca15eaf1387a3bfd67 (patch)
treec5103eb2e0f911b636c9583b43effca2bb2df8d7 /source/blender/freestyle
parentd15321082e12385161afe8c7f364ec535dd5ce95 (diff)
improved Freestyle IO formatting
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r--source/blender/freestyle/FRS_freestyle.h1
-rwxr-xr-xsource/blender/freestyle/intern/app_blender/Controller.cpp1
-rw-r--r--source/blender/freestyle/intern/app_blender/api.cpp7
-rw-r--r--source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp2
-rw-r--r--source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp2
-rwxr-xr-xsource/blender/freestyle/intern/stroke/Canvas.cpp6
-rwxr-xr-xsource/blender/freestyle/intern/stroke/Canvas.h1
7 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/freestyle/FRS_freestyle.h b/source/blender/freestyle/FRS_freestyle.h
index 42ca18b7351..aa66ce999bc 100644
--- a/source/blender/freestyle/FRS_freestyle.h
+++ b/source/blender/freestyle/FRS_freestyle.h
@@ -13,6 +13,7 @@ extern "C" {
extern float freestyle_sphere_radius;
extern float freestyle_dkr_epsilon;
+ extern float freestyle_fovyradian;
extern float freestyle_viewpoint[3];
extern float freestyle_mv[4][4];
extern float freestyle_proj[4][4];
diff --git a/source/blender/freestyle/intern/app_blender/Controller.cpp b/source/blender/freestyle/intern/app_blender/Controller.cpp
index 9595f1c51de..8cdb13d131d 100755
--- a/source/blender/freestyle/intern/app_blender/Controller.cpp
+++ b/source/blender/freestyle/intern/app_blender/Controller.cpp
@@ -636,6 +636,7 @@ void Controller::DrawStrokes()
_Canvas->Draw();
real d = _Chrono.stop();
cout << "Strokes generation : " << d << endl;
+ cout << "Stroke count : " << _Canvas->stroke_count << endl;
resetModified();
}
diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp
index 95045cccfdd..233fe26a38d 100644
--- a/source/blender/freestyle/intern/app_blender/api.cpp
+++ b/source/blender/freestyle/intern/app_blender/api.cpp
@@ -150,16 +150,17 @@ extern "C" {
void FRS_render_Blender(Render* re) {
if( controller->_ViewMap ) {
+ cout << "\n=== Rendering Freestyle with Blender's internal renderer ===" << endl;
+
// build strokes
controller->DrawStrokes();
-
- cout << "\n=== Rendering Freestyle with Blender's internal renderer ===" << endl;
+
controller->RenderBlender(re);
controller->CloseFile();
} else {
cout << "Freestyle cannot be used because the view map is not available" << endl;
}
- cout << "###################################################################" << endl;
+ cout << "\n###################################################################" << endl;
}
#ifdef __cplusplus
diff --git a/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp b/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp
index 7c3d41d0018..33a05b4389d 100644
--- a/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp
+++ b/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp
@@ -18,7 +18,7 @@ NodeGroup* BlenderFileLoader::Load()
ObjectInstanceRen *obi;
ObjectRen *obr;
- cout << "\nImporting triangular meshes into Blender" << endl;
+ cout << "\n=== Importing triangular meshes into Blender ===" << endl;
// creation of the scene root node
_Scene = new NodeGroup;
diff --git a/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp
index 59f54ce3881..a175620c8d7 100644
--- a/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp
@@ -56,7 +56,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer()
lb = scene->r.layers;
scene->r= old_scene->r;
scene->r.layers= lb;
- set_scene( scene ); // scene.makeCurrent()
+ set_scene( scene );
// image dimensions
float width = scene->r.xsch;
diff --git a/source/blender/freestyle/intern/stroke/Canvas.cpp b/source/blender/freestyle/intern/stroke/Canvas.cpp
index 84411c20970..01f5b9b6fb1 100755
--- a/source/blender/freestyle/intern/stroke/Canvas.cpp
+++ b/source/blender/freestyle/intern/stroke/Canvas.cpp
@@ -114,6 +114,8 @@ void Canvas::Draw()
_Layers[i] = _StyleModules[i]->execute();
+ stroke_count += _Layers[i]->strokes_size();
+
timestamp->increment();
}
postDraw();
@@ -146,6 +148,8 @@ void Canvas::Clear()
}
if(_steerableViewMap)
_steerableViewMap->Reset();
+
+ stroke_count = 0;
}
void Canvas::Erase()
@@ -161,6 +165,8 @@ void Canvas::Erase()
if(_steerableViewMap)
_steerableViewMap->Reset();
update();
+
+stroke_count = 0;
}
void Canvas::InsertStyleModule(unsigned index, StyleModule *iStyleModule) {
diff --git a/source/blender/freestyle/intern/stroke/Canvas.h b/source/blender/freestyle/intern/stroke/Canvas.h
index 4dd13950daf..b61e70099a8 100755
--- a/source/blender/freestyle/intern/stroke/Canvas.h
+++ b/source/blender/freestyle/intern/stroke/Canvas.h
@@ -175,6 +175,7 @@ public:
inline const StrokeRenderer * renderer() const {return _Renderer;}
inline StyleModule* getCurrentStyleModule() { return _current_sm; }
virtual bool getRecordFlag() const {return false;}
+ int stroke_count;
/*! modifiers */
inline void setSelectedFEdge(FEdge *iFEdge) {_SelectedFEdge = iFEdge;}