[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17783] branches/soc-2008-mxcurioni/source /blender/freestyle: improved Freestyle IO formatting
Maxime Curioni
maxime.curioni at gmail.com
Wed Dec 10 23:06:30 CET 2008
Revision: 17783
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17783
Author: mxcurioni
Date: 2008-12-10 23:06:27 +0100 (Wed, 10 Dec 2008)
Log Message:
-----------
improved Freestyle IO formatting
Modified Paths:
--------------
branches/soc-2008-mxcurioni/source/blender/freestyle/FRS_freestyle.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.h
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/FRS_freestyle.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/FRS_freestyle.h 2008-12-10 21:51:58 UTC (rev 17782)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/FRS_freestyle.h 2008-12-10 22:06:27 UTC (rev 17783)
@@ -13,6 +13,7 @@
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];
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp 2008-12-10 21:51:58 UTC (rev 17782)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp 2008-12-10 22:06:27 UTC (rev 17783)
@@ -636,6 +636,7 @@
_Canvas->Draw();
real d = _Chrono.stop();
cout << "Strokes generation : " << d << endl;
+ cout << "Stroke count : " << _Canvas->stroke_count << endl;
resetModified();
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp 2008-12-10 21:51:58 UTC (rev 17782)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp 2008-12-10 22:06:27 UTC (rev 17783)
@@ -150,16 +150,17 @@
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
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp 2008-12-10 21:51:58 UTC (rev 17782)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp 2008-12-10 22:06:27 UTC (rev 17783)
@@ -18,7 +18,7 @@
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;
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp 2008-12-10 21:51:58 UTC (rev 17782)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp 2008-12-10 22:06:27 UTC (rev 17783)
@@ -56,7 +56,7 @@
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;
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.cpp 2008-12-10 21:51:58 UTC (rev 17782)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.cpp 2008-12-10 22:06:27 UTC (rev 17783)
@@ -114,6 +114,8 @@
_Layers[i] = _StyleModules[i]->execute();
+ stroke_count += _Layers[i]->strokes_size();
+
timestamp->increment();
}
postDraw();
@@ -146,6 +148,8 @@
}
if(_steerableViewMap)
_steerableViewMap->Reset();
+
+ stroke_count = 0;
}
void Canvas::Erase()
@@ -161,6 +165,8 @@
if(_steerableViewMap)
_steerableViewMap->Reset();
update();
+
+stroke_count = 0;
}
void Canvas::InsertStyleModule(unsigned index, StyleModule *iStyleModule) {
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.h 2008-12-10 21:51:58 UTC (rev 17782)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.h 2008-12-10 22:06:27 UTC (rev 17783)
@@ -175,6 +175,7 @@
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;}
More information about the Bf-blender-cvs
mailing list