Commit: 21a2b975b8192c2714625c8f5e98a08fde796ba7 Author: Omar Emara Date: Mon Feb 8 17:28:15 2021 +0200 Branches: master https://developer.blender.org/rB21a2b975b8192c2714625c8f5e98a08fde796ba7
Cleanup: Remove using-directive from freestyle headers The header files in freestyle utilize the using-directive at the global file scope. This is a bad practice as it pollutes the global name space causing possible ambiguous reference compilation errors. In particular, the DNA files that are included by freestyle will cause those ambiguous reference errors when the developers adds a DNA member with a type name that also exist in the Freestyle name space, such as Curve and possibly others. This patch does the minimal work needed to resolve that by moving the using-directives from the headers into the corresponding translation units. Reviewed By: Brecht Differential Revision: https://developer.blender.org/D10351 =================================================================== M source/blender/freestyle/intern/python/BPy_BBox.cpp M source/blender/freestyle/intern/python/BPy_BBox.h M source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp M source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h M source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp M source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h M source/blender/freestyle/intern/python/BPy_Convert.cpp M source/blender/freestyle/intern/python/BPy_Convert.h M source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp M source/blender/freestyle/intern/python/BPy_FrsMaterial.h M source/blender/freestyle/intern/python/BPy_FrsNoise.cpp M source/blender/freestyle/intern/python/BPy_FrsNoise.h M source/blender/freestyle/intern/python/BPy_Id.cpp M source/blender/freestyle/intern/python/BPy_Id.h M source/blender/freestyle/intern/python/BPy_IntegrationType.cpp M source/blender/freestyle/intern/python/BPy_IntegrationType.h M source/blender/freestyle/intern/python/BPy_Interface0D.cpp M source/blender/freestyle/intern/python/BPy_Interface0D.h M source/blender/freestyle/intern/python/BPy_Interface1D.cpp M source/blender/freestyle/intern/python/BPy_Interface1D.h M source/blender/freestyle/intern/python/BPy_Iterator.cpp M source/blender/freestyle/intern/python/BPy_Iterator.h M source/blender/freestyle/intern/python/BPy_MediumType.cpp M source/blender/freestyle/intern/python/BPy_MediumType.h M source/blender/freestyle/intern/python/BPy_Nature.cpp M source/blender/freestyle/intern/python/BPy_Nature.h M source/blender/freestyle/intern/python/BPy_Operators.cpp M source/blender/freestyle/intern/python/BPy_Operators.h M source/blender/freestyle/intern/python/BPy_SShape.cpp M source/blender/freestyle/intern/python/BPy_SShape.h M source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp M source/blender/freestyle/intern/python/BPy_StrokeAttribute.h M source/blender/freestyle/intern/python/BPy_StrokeShader.cpp M source/blender/freestyle/intern/python/BPy_StrokeShader.h M source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp M source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h M source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp M source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h M source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp M source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h M source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp M source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h M source/blender/freestyle/intern/python/BPy_ViewMap.cpp M source/blender/freestyle/intern/python/BPy_ViewMap.h M source/blender/freestyle/intern/python/BPy_ViewShape.cpp M source/blender/freestyle/intern/python/BPy_ViewShape.h M source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp M source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp M source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp M source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp M source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp M source/blender/freestyle/intern/python/Director.cpp M source/blender/freestyle/intern/python/Director.h M source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp M source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h M source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp M source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h M source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp M source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h M source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp M source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h M source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp M source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h M source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp M source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h M source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp M source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h M source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp M source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h M source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp M source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.h M source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp M source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h M source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp M source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h M source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp M source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h M source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp M source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h M source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp M source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h M source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp M source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h M source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp M source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h M source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp M source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h M source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp M source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h M source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp M source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h M source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp M source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h M source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp M source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h M source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp M source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h M source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp M source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h M source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp M source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp M source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp M source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp M source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp =================================================================== diff --git a/source/blender/freestyle/intern/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp index d66a74bc83f..39dd55f0cc1 100644 --- a/source/blender/freestyle/intern/python/BPy_BBox.cpp +++ b/source/blender/freestyle/intern/python/BPy_BBox.cpp @@ -24,6 +24,9 @@ extern "C" { #endif +using namespace Freestyle; +using namespace Freestyle::Geometry; + /////////////////////////////////////////////////////////////////////////////////////////// //-------------------MODULE INITIALIZATION-------------------------------- diff --git a/source/blender/freestyle/intern/python/BPy_BBox.h b/source/blender/freestyle/intern/python/BPy_BBox.h index a284deed10c..889dbc62a41 100644 --- a/source/blender/freestyle/intern/python/BPy_BBox.h +++ b/source/blender/freestyle/intern/python/BPy_BBox.h @@ -27,9 +27,6 @@ extern "C" { #include "../geometry/BBox.h" #include "../geometry/Geom.h" -using namespace Freestyle; -using namespace Freestyle::Geometry; - #ifdef __cplusplus extern "C" { #endif @@ -42,7 +39,7 @@ extern PyTypeObject BBox_Type; /*---------------------------Python BPy_BBox structure definition----------*/ typedef struct { - PyObject_HEAD BBox<Vec3r> *bb; + PyObject_HEAD Freestyle::BBox<Freestyle::Geometry::Vec3r> *bb; } BPy_BBox; /*---------------------------Python BPy_BBox visible prototypes-----------*/ diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp index 2359d79f7d0..d12804761f0 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp @@ -27,6 +27,8 @@ extern "C" { #endif +using namespace Freestyle; + /////////////////////////////////////////////////////////////////////////////////////////// //-------------------MODULE INITIALIZATION-------------------------------- diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h index cdf81f3e4fc..a368d4cd47e 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h @@ -26,8 +26,6 @@ extern "C" { #include "../stroke/Predicates0D.h" -using namespace Freestyle; - #ifdef __cplusplus extern "C" { #endif @@ -41,7 +39,7 @@ extern PyTypeObject BinaryPredicate0D_Type; /*---------------------------Python BPy_BinaryPredicate0D structure definition----------*/ typedef struct { - PyObject_HEAD BinaryPredicate0D *bp0D; + PyObject_HEAD Freestyle::BinaryPredicate0D *bp0D; } BPy_BinaryPredicate0D; /*---------------------------Python BPy_BinaryPredicate0D visible prototypes-----------*/ diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp index 7d554e0abe1..969041702b5 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp @@ -33,6 +33,8 @@ extern "C" { #endif +using namespace Freestyle; + /////////////////////////////////////////////////////////////////////////////////////////// //-------------------MODULE INITIALIZATION-------------------------------- diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h index b761f6f6ace..b34fad9e213 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h @@ -26,8 +26,6 @@ extern "C" { #include "../stroke/Predicates1D.h" -using namespace Freestyle; - #ifdef __cplusplus extern "C" { #endif @@ -41,7 +39,7 @@ extern PyTypeObject BinaryPredicate1D_Type; /*---------------------------Python BPy_BinaryPredicate1D structure definition----------*/ typedef struct { - PyObject_HEAD BinaryPredicate1D *bp1D; + PyObject_HEAD Freestyle::BinaryPredicate1D *bp1D; } BPy_BinaryPredicate1D; /*---------------------------Python BPy_BinaryPredicate1D visible prototypes-----------*/ diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index f1d7a242a93..99ba3090137 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -61,6 +61,9 @@ extern "C" { #endif +using namespace Freestyle; +using namespace Freestyle::Geometry; + /////////////////////////////////////////////////////////////////////////////////////////// //============================== diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 5a1c11ec086..e0916196808 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -28,9 +28,6 @@ extern "C" { #include "../geometry/Geom.h" -using namespace Freestyle; -using namespace Freestyle::Geometry; - // BBox #include "../geometry/BBox.h" @@ -94,76 +91,81 @@ extern "C" { //============================== PyObject *PyBool_from_bool(bool b); -PyObject *Vector_from_Vec2f(Vec2f &v); -PyObject *Vector_from_Vec3f(Vec3f &v); -PyObject *Vector_from_Vec3r(Vec3r &v); - -PyObject *Any_BPy_Interface0D_from_Interface0D(Interface0D &if0D); -PyObject *Any_BPy_Interface1D_from_Interface1D(Interface1D &if1D); -PyObject *Any_BPy_FEdge_from_FEdge(FEdge &fe); -PyObject *Any_BPy_ViewVertex_from_ViewVertex(ViewVertex &vv); - -PyObject *BPy_BBox_from_BBox(const BBox<Vec3r> &bb); -PyObject *BPy_CurvePoint_from_CurvePoint(CurvePoint &cp); -PyObject *BPy_directedViewEdge_from_directedViewEdge(ViewVertex::directedViewEdge &dve); -PyObject *BPy_FEdge_from_FEdge(FEdge &fe); -PyObject *BPy_FEdgeSharp_from_FEdgeSharp(FEdgeSharp &fes); -PyObject *BPy_FEdgeSmooth_from_FEdgeSmooth(FEdgeSmooth &fes); -PyObject *BPy_Id_from_Id(Id &id); -PyObject *BPy_Interface0D_from_Interface0D(Interface0D &if0D); -PyObject *BPy_Interface1D_from_Interface1D(Interface1D &if1D); -PyObject *BPy_IntegrationType_from_IntegrationType(IntegrationType i); -PyObject *BPy_FrsMaterial_from_FrsMaterial(const FrsMaterial &m); +PyObject *Vector_from_Vec2f(Freestyle::Geometry::Vec2f &v); +PyObject *Vector_from_Vec3f(Freestyle::Geometry::Vec3f &v); +PyObject *Vector_from_Vec3r(Freestyle::Geometry::Vec3r &v); + +PyObject *Any_BPy_Interface0D_from_Interface0D(Freestyle::Interface0D &if0D); +PyObject *Any_BPy_Interface1D_from_Interface1D(Freestyle::Interface1D &if1D); +PyObject *Any_BPy_FEdge_from_FEdge(Freestyle::FEdge &fe); +PyObject *Any_BPy_ViewVertex_from_ViewVertex(Freestyle::ViewVertex &vv); + +PyObject *BPy_BBox_from_BBox(const Freestyle::BBox<Freestyle::Geometry::Vec3r> &bb); +PyObject *BPy_CurvePoint_from_CurvePoint(Freestyle::CurvePoint &cp); +PyObject *BPy_directedViewEdge_from_directedViewEdge(Freestyle::ViewVertex::directedViewEdge &dve); +PyObject *BPy_FEdge_from_FEdge(Freestyle::FEdge &fe); +PyObject *BPy_FEdgeSharp_from_FEdgeSharp(Freestyle::FEdgeSharp &fes); +PyObject *BPy_FEdgeSmooth_from_FEdgeSmooth(Freestyle::FEdgeSmooth &fes); +PyObject *BPy_Id_from_Id(Freestyle::Id &id); +PyObject *BPy_Interface0D_from_Interface0D(Freestyle::Interface0D &if0D); +PyObject *BPy_Interface1D_from_Interface1D(Freestyle::Interface1D &if1D); +PyObject *BPy_IntegrationType_from_IntegrationType(Freestyle::IntegrationType i); +PyObject *BPy_FrsMaterial_from_FrsMaterial(const Freestyle::FrsMaterial &m); PyObject *BPy_Nature_from_Nature(unsigned short n); -PyObject *BPy_MediumType_from_MediumType(Stroke::MediumType n); -PyObject *BPy_SShape_from_SShape(SShape &ss); -PyObject *BPy_Stroke_from_Stroke(Stroke &s); -PyObject *BPy_StrokeAttribute_from_StrokeAttribute(StrokeAttribute &sa); -PyObject *BPy_StrokeVertex_from_StrokeVertex(StrokeVertex &sv); -PyObject *BPy_SVertex_from_SVertex(SVertex &sv); -PyObject *BPy_ViewVertex_from_ViewVertex(ViewVertex &vv); -PyObject *BPy_NonTVertex_from_NonTVertex(NonTVertex &ntv); -PyObject *BPy_TVertex_from_TVertex(TVertex &tv); -PyObject *BPy_ViewEdge_from_ViewEdge(ViewEdge &ve); -PyObject *BPy_Chain_from_Chain(Chain &c); -PyObject *BPy_ViewShape_from_ViewShape(ViewShape &vs); - -PyObject *BPy_AdjacencyIterator_from_AdjacencyIterator(AdjacencyIterator &a_it); -PyObject *BPy_Interface0DIterator_from_Interface0DIterator(Interface0DIterator &if0D_it, +PyObject *BPy_MediumType_from_MediumType(Freestyle::Stroke::MediumType n); +PyObject *BPy_SShape_from_SShape(Freestyle::SShape &ss); +PyObject *BPy_Stroke_from_Stroke(Freestyle::Stroke &s); +PyObject *BPy_StrokeAttribute_from_StrokeAttribute(Freestyle::StrokeAttribute &sa); +PyObject *BPy_StrokeVertex_from_StrokeVertex(Freestyle::StrokeVertex &sv); +PyObject *BPy_SVertex_from_SVertex(Freestyle::SVertex &sv); +PyObject *BPy_ViewVertex_from_ViewVertex(Freestyle::ViewVertex &vv); +PyObject *BPy_NonTVertex_from_NonTVertex(Freestyle::NonTVertex &ntv); +PyObject *BPy_TVertex_from_TVertex(Freestyle::TVertex &tv); +PyObject *BPy_ViewEdge_from_ViewEdge(Freestyle::ViewEdge &ve); +PyObject *BPy_Chain_from_Chain(Freestyle::Chain &c); +PyObject *BPy_ViewShape_from_ViewShape(Freestyle::ViewShape &vs); + +PyObject *BPy_AdjacencyIterator_from_AdjacencyIterator(Freestyle::AdjacencyIterator &a_it); +PyObject *BPy_Interface0DIterator_from_Interface0DIterator(Freestyle::Interface0DIterator &if0D_it, bool reversed); -PyObject *BPy_CurvePointIterator_from_CurvePointIterator(CurveInternal::CurvePointIterator &cp_it); +PyObject *BPy_CurvePointIterator_from_CurvePointIterator( + Freestyle::CurveInternal::CurvePointIterator &cp_it); PyObject *BPy_StrokeVertexIterator_from_StrokeVertexIterator( - StrokeInternal::StrokeVertexIterator &sv_it, bool reversed); -PyObject *BPy_SVertexIterator_from_SVertexIterator(ViewEdgeInternal::SVertexIterator &sv_it); + Freestyle::StrokeInternal::StrokeVertexIterator &sv_it, bool reversed); +PyObject *BPy_SVertexIterator_from_SVertexIterator( + Freestyle::ViewEdgeInternal::SVertexIterator &sv_it); PyObject *BPy_orientedV @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-blender-cvs
