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-04-09 04:46:49 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-04-09 04:46:49 +0400
commit800f86c8454ced85c29d1dcb04dcb163689a89d3 (patch)
tree4598a2ea78a1d1cf6a4c0a9e7030de4c826a006d /source/blender/freestyle/intern/scene_graph
parente6bd510dde6289efcead80e3d21cb21876282a56 (diff)
Attempt to fix a potential name conflict between Freestyle and the compositor.
A crash in the Freestyle renderer was reported by Ton on IRC with a stack trace below. Note that #2 is in Freestyle, whereas #1 is in the compositor. The problem was observed in a debug build on OS X 10.7 (gcc 4.2, openmp disabled, no llvm). ---------------------------------------------------------------------- Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x0000000000000000 [Switching to process 72386 thread 0xf303] 0x0000000100c129f3 in NodeBase::~NodeBase (this=0x10e501c80) at COM_NodeBase.cpp:43 43 delete (this->m_outputsockets.back()); Current language: auto; currently c++ (gdb) where #0 0x0000000100c129f3 in NodeBase::~NodeBase (this=0x10e501c80) at COM_NodeBase.cpp:43 #1 0x0000000100c29066 in Node::~Node (this=0x10e501c80) at COM_Node.h:49 #2 0x000000010089c273 in NodeShape::~NodeShape (this=0x10e501c80) at NodeShape.cpp:43 #3 0x000000010089910b in NodeGroup::destroy (this=0x10e501da0) at NodeGroup.cpp:61 #4 0x00000001008990cd in NodeGroup::destroy (this=0x10e5014b0) at NodeGroup.cpp:59 #5 0x00000001008990cd in NodeGroup::destroy (this=0x114e18da0) at NodeGroup.cpp:59 #6 0x00000001007e6602 in Controller::ClearRootNode (this=0x114e19640) at Controller.cpp:329 #7 0x00000001007ea52e in Controller::LoadMesh (this=0x114e19640, re=0x10aba4638, srl=0x1140f5258) at Controller.cpp:302 #8 0x00000001008030ad in prepare (re=0x10aba4638, srl=0x1140f5258) at FRS_freestyle.cpp:302 #9 0x000000010080457a in FRS_do_stroke_rendering (re=0x10aba4638, srl=0x1140f5258) at FRS_freestyle.cpp:600 #10 0x00000001006aeb9d in add_freestyle (re=0x10aba4638) at pipeline.c:1584 #11 0x00000001006aceb7 in do_render_3d (re=0x10aba4638) at pipeline.c:1094 #12 0x00000001006ae061 in do_render_fields_blur_3d (re=0x10aba4638) at pipeline.c:1367 #13 0x00000001006afa16 in do_render_composite_fields_blur_3d (re=0x10aba4638) at pipeline.c:1815 #14 0x00000001006b04e4 in do_render_all_options (re=0x10aba4638) at pipeline.c:2021 ---------------------------------------------------------------------- Apparently a name conflict between the two Blender modules is taking place. The present commit hence intends to address it by putting all the Freestyle C++ classes in the namespace 'Freestyle'. This revision will also prevent potential name conflicts with other Blender modules in the future. Special thanks to Lukas Toenne for the help with C++ namespace.
Diffstat (limited to 'source/blender/freestyle/intern/scene_graph')
-rw-r--r--source/blender/freestyle/intern/scene_graph/DrawingStyle.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/FrsMaterial.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/LineRep.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/LineRep.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/Node.h5
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeCamera.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeCamera.h3
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeGroup.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeGroup.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeLight.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeLight.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeShape.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeShape.h5
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeTransform.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeTransform.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/OrientedLineRep.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/OrientedLineRep.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/Rep.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/SceneVisitor.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/TriangleRep.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/TriangleRep.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/VertexRep.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/VertexRep.h4
29 files changed, 117 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/scene_graph/DrawingStyle.h b/source/blender/freestyle/intern/scene_graph/DrawingStyle.h
index 073cf0448bc..b95e96a09aa 100644
--- a/source/blender/freestyle/intern/scene_graph/DrawingStyle.h
+++ b/source/blender/freestyle/intern/scene_graph/DrawingStyle.h
@@ -28,6 +28,8 @@
* \date 10/10/2002
*/
+namespace Freestyle {
+
class DrawingStyle
{
public:
@@ -118,4 +120,6 @@ DrawingStyle& DrawingStyle::operator=(const DrawingStyle& ds)
return *this;
}
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_DRAWING_STYLE_H__
diff --git a/source/blender/freestyle/intern/scene_graph/FrsMaterial.h b/source/blender/freestyle/intern/scene_graph/FrsMaterial.h
index aad68efbea1..43a61e772f9 100644
--- a/source/blender/freestyle/intern/scene_graph/FrsMaterial.h
+++ b/source/blender/freestyle/intern/scene_graph/FrsMaterial.h
@@ -30,6 +30,8 @@
#include "../system/FreestyleConfig.h"
+namespace Freestyle {
+
/*! Class defining a material */
class FrsMaterial
{
@@ -369,4 +371,6 @@ bool FrsMaterial::operator==(const FrsMaterial& m) const
return (!((*this) != m));
}
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_MATERIAL_H__
diff --git a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
index 67e6aa99303..8a2740b94df 100644
--- a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
+++ b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
@@ -27,6 +27,8 @@
#include "IndexedFaceSet.h"
+namespace Freestyle {
+
IndexedFaceSet::IndexedFaceSet() : Rep()
{
_Vertices = NULL;
@@ -321,3 +323,5 @@ void IndexedFaceSet::ComputeBBox()
setBBox(BBox<Vec3r>(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax)));
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h
index 422691d4d0e..2995360fb24 100644
--- a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h
+++ b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h
@@ -36,6 +36,8 @@
#include "../system/FreestyleConfig.h"
+namespace Freestyle {
+
class LIB_SCENE_GRAPH_EXPORT IndexedFaceSet : public Rep
{
public:
@@ -312,4 +314,6 @@ protected:
unsigned int _displayList;
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_INDEXED_FACE_SET_H__
diff --git a/source/blender/freestyle/intern/scene_graph/LineRep.cpp b/source/blender/freestyle/intern/scene_graph/LineRep.cpp
index 88348648024..e7d81113974 100644
--- a/source/blender/freestyle/intern/scene_graph/LineRep.cpp
+++ b/source/blender/freestyle/intern/scene_graph/LineRep.cpp
@@ -27,6 +27,8 @@
#include "LineRep.h"
+namespace Freestyle {
+
void LineRep::ComputeBBox()
{
real XMax = _vertices.front()[0];
@@ -62,3 +64,5 @@ void LineRep::ComputeBBox()
setBBox(BBox<Vec3r>(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax)));
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/LineRep.h b/source/blender/freestyle/intern/scene_graph/LineRep.h
index 6491e89ac97..c5de30309f6 100644
--- a/source/blender/freestyle/intern/scene_graph/LineRep.h
+++ b/source/blender/freestyle/intern/scene_graph/LineRep.h
@@ -37,6 +37,8 @@
using namespace std;
+namespace Freestyle {
+
/*! Base class for all lines objects */
class LIB_SCENE_GRAPH_EXPORT LineRep : public Rep
{
@@ -148,4 +150,6 @@ private:
float _width;
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_LINE_REP_H__
diff --git a/source/blender/freestyle/intern/scene_graph/Node.h b/source/blender/freestyle/intern/scene_graph/Node.h
index 6c23e6bdcba..47ce6aaf8e6 100644
--- a/source/blender/freestyle/intern/scene_graph/Node.h
+++ b/source/blender/freestyle/intern/scene_graph/Node.h
@@ -38,6 +38,9 @@
#include "../geometry/Geom.h"
using namespace std;
+
+namespace Freestyle {
+
using namespace Geometry;
class LIB_SCENE_GRAPH_EXPORT Node : public BaseObject
@@ -105,4 +108,6 @@ private:
BBox<Vec3r> _BBox;
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_NODE_H__
diff --git a/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp b/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
index c30252ada5e..33f40b5778f 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
@@ -30,6 +30,8 @@
#include "NodeCamera.h"
+namespace Freestyle {
+
static void loadIdentity(double * matrix)
{
int i;
@@ -136,3 +138,5 @@ NodePerspectiveCamera::NodePerspectiveCamera(double left, double right, double b
projection_matrix_[14] = -1.0;
projection_matrix_[15] = 0;
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/NodeCamera.h b/source/blender/freestyle/intern/scene_graph/NodeCamera.h
index c6019e60ca1..8e5cf9be52d 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeCamera.h
+++ b/source/blender/freestyle/intern/scene_graph/NodeCamera.h
@@ -34,6 +34,8 @@
#include "../system/FreestyleConfig.h"
+namespace Freestyle {
+
using namespace Geometry;
class NodeOrthographicCamera;
@@ -205,5 +207,6 @@ public:
NodePerspectiveCamera(double left, double right, double bottom, double top, double zNear, double zFar);
};
+} /* namespace Freestyle */
#endif // __FREESTYLE_NODE_CAMERA_H__
diff --git a/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp b/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp
index 657e6a6035d..5868cb92971 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp
@@ -27,6 +27,8 @@
#include "NodeDrawingStyle.h"
+namespace Freestyle {
+
void NodeDrawingStyle::accept(SceneVisitor& v)
{
v.visitNodeDrawingStyle(*this);
@@ -37,3 +39,5 @@ void NodeDrawingStyle::accept(SceneVisitor& v)
(*node)->accept(v);
v.visitNodeDrawingStyleAfter(*this);
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h b/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h
index 71568eabe7c..a846b050db1 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h
+++ b/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h
@@ -33,6 +33,8 @@
#include "../system/FreestyleConfig.h"
+namespace Freestyle {
+
class LIB_SCENE_GRAPH_EXPORT NodeDrawingStyle : public NodeGroup
{
public:
@@ -101,4 +103,6 @@ private:
DrawingStyle _DrawingStyle;
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_NODE_DRAWING_STYLE_H__
diff --git a/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp b/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
index 202c1c8141c..35d39dcf667 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
@@ -28,6 +28,8 @@
#include "NodeGroup.h"
+namespace Freestyle {
+
void NodeGroup::AddChild(Node *iChild)
{
if (NULL == iChild)
@@ -117,3 +119,5 @@ const BBox<Vec3r>& NodeGroup::UpdateBBox()
return Node::UpdateBBox();
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/NodeGroup.h b/source/blender/freestyle/intern/scene_graph/NodeGroup.h
index ce758499147..8123639e01f 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeGroup.h
+++ b/source/blender/freestyle/intern/scene_graph/NodeGroup.h
@@ -37,6 +37,8 @@
using namespace std;
+namespace Freestyle {
+
class LIB_SCENE_GRAPH_EXPORT NodeGroup : public Node
{
public:
@@ -79,4 +81,6 @@ protected:
vector<Node*> _Children;
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_NODE_GROUP_H__
diff --git a/source/blender/freestyle/intern/scene_graph/NodeLight.cpp b/source/blender/freestyle/intern/scene_graph/NodeLight.cpp
index 9cb8fbc3926..5a54bc09891 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeLight.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeLight.cpp
@@ -27,6 +27,8 @@
#include "NodeLight.h"
+namespace Freestyle {
+
int NodeLight::numberOfLights = 0;
NodeLight::NodeLight() : Node()
@@ -77,3 +79,5 @@ void NodeLight::accept(SceneVisitor& v)
{
v.visitNodeLight(*this);
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/NodeLight.h b/source/blender/freestyle/intern/scene_graph/NodeLight.h
index 66a9cabd221..25e13a768ec 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeLight.h
+++ b/source/blender/freestyle/intern/scene_graph/NodeLight.h
@@ -34,6 +34,8 @@
#include "../system/FreestyleConfig.h"
+namespace Freestyle {
+
using namespace Geometry;
class LIB_SCENE_GRAPH_EXPORT NodeLight : public Node
@@ -103,4 +105,6 @@ private:
int _number;
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_NODE_LIGHT_H__
diff --git a/source/blender/freestyle/intern/scene_graph/NodeShape.cpp b/source/blender/freestyle/intern/scene_graph/NodeShape.cpp
index 9ea94a16d79..1c1db9d9638 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeShape.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeShape.cpp
@@ -27,6 +27,8 @@
#include "NodeShape.h"
+namespace Freestyle {
+
NodeShape::~NodeShape()
{
vector<Rep *>::iterator rep;
@@ -54,3 +56,5 @@ void NodeShape::accept(SceneVisitor& v)
(*rep)->accept(v);
v.visitNodeShapeAfter(*this);
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/NodeShape.h b/source/blender/freestyle/intern/scene_graph/NodeShape.h
index fd077be6cc4..3b4491f8b6d 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeShape.h
+++ b/source/blender/freestyle/intern/scene_graph/NodeShape.h
@@ -40,6 +40,9 @@
#include "Rep.h"
using namespace std;
+
+namespace Freestyle {
+
using namespace Geometry;
class LIB_SCENE_GRAPH_EXPORT NodeShape : public Node
@@ -93,4 +96,6 @@ private:
FrsMaterial _FrsMaterial;
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_NODE_SHAPE_H__
diff --git a/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp b/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp
index 1c990f07734..5d26e85195f 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp
@@ -30,6 +30,8 @@
#include "../system/FreestyleConfig.h"
+namespace Freestyle {
+
void NodeTransform::Translate(real x, real y, real z)
{
_Matrix(0, 3) += x;
@@ -169,3 +171,5 @@ bool NodeTransform::isScaled(const Matrix44r &M)
return false;
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/NodeTransform.h b/source/blender/freestyle/intern/scene_graph/NodeTransform.h
index f61c4723c3f..544075998a4 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeTransform.h
+++ b/source/blender/freestyle/intern/scene_graph/NodeTransform.h
@@ -35,6 +35,8 @@
#include "../system/FreestyleConfig.h"
+namespace Freestyle {
+
using namespace Geometry;
class LIB_SCENE_GRAPH_EXPORT NodeTransform : public NodeGroup
@@ -100,4 +102,6 @@ private:
bool _Scaled;
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_NODE_TRANSFORM_H__
diff --git a/source/blender/freestyle/intern/scene_graph/OrientedLineRep.cpp b/source/blender/freestyle/intern/scene_graph/OrientedLineRep.cpp
index 1e78d657b87..2c397cd18fc 100644
--- a/source/blender/freestyle/intern/scene_graph/OrientedLineRep.cpp
+++ b/source/blender/freestyle/intern/scene_graph/OrientedLineRep.cpp
@@ -29,6 +29,8 @@
#include "../system/BaseObject.h"
+namespace Freestyle {
+
void OrientedLineRep::accept(SceneVisitor& v)
{
Rep::accept(v);
@@ -37,3 +39,5 @@ void OrientedLineRep::accept(SceneVisitor& v)
else
v.visitLineRep(*this);
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/OrientedLineRep.h b/source/blender/freestyle/intern/scene_graph/OrientedLineRep.h
index 19bf9cc0e88..7272d47892a 100644
--- a/source/blender/freestyle/intern/scene_graph/OrientedLineRep.h
+++ b/source/blender/freestyle/intern/scene_graph/OrientedLineRep.h
@@ -32,6 +32,8 @@
#include "../system/FreestyleConfig.h"
+namespace Freestyle {
+
class LIB_SCENE_GRAPH_EXPORT OrientedLineRep : public LineRep
{
public:
@@ -56,4 +58,6 @@ public:
virtual void accept(SceneVisitor& v);
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_ORIENTED_LINE_REP_H__
diff --git a/source/blender/freestyle/intern/scene_graph/Rep.h b/source/blender/freestyle/intern/scene_graph/Rep.h
index 1f90812162e..92624199c40 100644
--- a/source/blender/freestyle/intern/scene_graph/Rep.h
+++ b/source/blender/freestyle/intern/scene_graph/Rep.h
@@ -38,6 +38,8 @@
#include "../system/Id.h"
#include "../system/Precision.h"
+namespace Freestyle {
+
using namespace Geometry;
class LIB_SCENE_GRAPH_EXPORT Rep : public BaseObject
@@ -163,4 +165,6 @@ private:
FrsMaterial *_FrsMaterial;
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_REP_H__
diff --git a/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp b/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp
index 6a1300b9dcf..4e87625f6f9 100644
--- a/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp
+++ b/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp
@@ -31,6 +31,8 @@
#include "IndexedFaceSet.h"
#include "ScenePrettyPrinter.h"
+namespace Freestyle {
+
#define VISIT(CLASS) \
void ScenePrettyPrinter::visit##CLASS(CLASS&) \
{ \
@@ -101,3 +103,5 @@ void ScenePrettyPrinter::visitIndexedFaceSet(IndexedFaceSet& ifs)
p += 3;
}
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.h b/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.h
index 8d52c7bccce..e3fe5ee4d78 100644
--- a/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.h
+++ b/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.h
@@ -37,6 +37,8 @@
using namespace std;
+namespace Freestyle {
+
class ScenePrettyPrinter : public SceneVisitor
{
public:
@@ -99,4 +101,6 @@ private:
string _space;
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_SCENE_PRETTY_PRINTER_H__
diff --git a/source/blender/freestyle/intern/scene_graph/SceneVisitor.h b/source/blender/freestyle/intern/scene_graph/SceneVisitor.h
index 43c760efde6..1f1be21df72 100644
--- a/source/blender/freestyle/intern/scene_graph/SceneVisitor.h
+++ b/source/blender/freestyle/intern/scene_graph/SceneVisitor.h
@@ -30,6 +30,8 @@
#include "../system/FreestyleConfig.h"
+namespace Freestyle {
+
#define VISIT_COMPLETE_DEF(type) \
virtual void visit##type(type&) {} \
virtual void visit##type##Before(type&) {} \
@@ -92,4 +94,6 @@ public:
VISIT_COMPLETE_DEF(FrsMaterial)
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_SCENE_VISITOR_H__
diff --git a/source/blender/freestyle/intern/scene_graph/TriangleRep.cpp b/source/blender/freestyle/intern/scene_graph/TriangleRep.cpp
index b9ff2408fba..98efefb8314 100644
--- a/source/blender/freestyle/intern/scene_graph/TriangleRep.cpp
+++ b/source/blender/freestyle/intern/scene_graph/TriangleRep.cpp
@@ -27,6 +27,8 @@
#include "TriangleRep.h"
+namespace Freestyle {
+
void TriangleRep::ComputeBBox()
{
real XMax = _vertices[0][0];
@@ -60,3 +62,5 @@ void TriangleRep::ComputeBBox()
setBBox(BBox<Vec3r>(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax)));
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/TriangleRep.h b/source/blender/freestyle/intern/scene_graph/TriangleRep.h
index b0f4e65b520..d204d128de4 100644
--- a/source/blender/freestyle/intern/scene_graph/TriangleRep.h
+++ b/source/blender/freestyle/intern/scene_graph/TriangleRep.h
@@ -31,6 +31,8 @@
//! inherits from class Rep
#include "Rep.h"
+namespace Freestyle {
+
/*! Base class for all lines objects */
class LIB_SCENE_GRAPH_EXPORT TriangleRep : public Rep
{
@@ -140,4 +142,6 @@ public:
virtual void ComputeBBox();
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_TRIANGLE_REP_H__
diff --git a/source/blender/freestyle/intern/scene_graph/VertexRep.cpp b/source/blender/freestyle/intern/scene_graph/VertexRep.cpp
index 50349a94257..475c6d6d153 100644
--- a/source/blender/freestyle/intern/scene_graph/VertexRep.cpp
+++ b/source/blender/freestyle/intern/scene_graph/VertexRep.cpp
@@ -27,8 +27,12 @@
#include "VertexRep.h"
+namespace Freestyle {
+
void VertexRep::ComputeBBox()
{
setBBox(BBox<Vec3r>(Vec3r(_coordinates[0], _coordinates[1], _coordinates[2]),
Vec3r(_coordinates[0], _coordinates[1], _coordinates[2])));
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/VertexRep.h b/source/blender/freestyle/intern/scene_graph/VertexRep.h
index 41c0da1f786..1f1284fe163 100644
--- a/source/blender/freestyle/intern/scene_graph/VertexRep.h
+++ b/source/blender/freestyle/intern/scene_graph/VertexRep.h
@@ -30,6 +30,8 @@
#include "Rep.h"
+namespace Freestyle {
+
class LIB_SCENE_GRAPH_EXPORT VertexRep : public Rep
{
public:
@@ -131,4 +133,6 @@ private:
float _PointSize;
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_VERTEX_REP_H__