diff options
author | Omar Emara <mail@OmarEmara.dev> | 2021-02-08 18:28:15 +0300 |
---|---|---|
committer | Omar Emara <mail@OmarEmara.dev> | 2021-02-08 18:29:42 +0300 |
commit | 21a2b975b8192c2714625c8f5e98a08fde796ba7 (patch) | |
tree | 6ed0259b5f525072aa48e22e0f3764d6aee17e52 /source/blender/freestyle/intern/python/Interface0D | |
parent | 048135e2c826b46ecf77324b93246ad70171e91d (diff) |
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
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface0D')
12 files changed, 18 insertions, 6 deletions
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp index f70f70275df..57639b6161b 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp @@ -27,6 +27,8 @@ extern "C" { #endif +using namespace Freestyle; + /////////////////////////////////////////////////////////////////////////////////////////// /*----------------------CurvePoint methods----------------------------*/ diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h index 6a550085817..0def155d22b 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h @@ -37,7 +37,7 @@ extern PyTypeObject CurvePoint_Type; /*---------------------------Python BPy_CurvePoint structure definition----------*/ typedef struct { BPy_Interface0D py_if0D; - CurvePoint *cp; + Freestyle::CurvePoint *cp; } BPy_CurvePoint; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index b245ecd81f1..63a9ead910e 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -28,6 +28,8 @@ extern "C" { #endif +using namespace Freestyle; + /////////////////////////////////////////////////////////////////////////////////////////// /*----------------------SVertex methods ----------------------------*/ diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h index 8d24576a98f..d2fa48d17d8 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h @@ -37,7 +37,7 @@ extern PyTypeObject SVertex_Type; /*---------------------------Python BPy_SVertex structure definition----------*/ typedef struct { BPy_Interface0D py_if0D; - SVertex *sv; + Freestyle::SVertex *sv; } BPy_SVertex; /*---------------------------Python BPy_SVertex visible prototypes-----------*/ diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp index 696b3022e85..98fb460c3e4 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp @@ -28,6 +28,8 @@ extern "C" { #endif +using namespace Freestyle; + /////////////////////////////////////////////////////////////////////////////////////////// /*----------------------ViewVertex methods----------------------------*/ diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h index cb9815fb3d4..b5881dcafb5 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h @@ -37,7 +37,7 @@ extern PyTypeObject ViewVertex_Type; /*---------------------------Python BPy_ViewVertex structure definition----------*/ typedef struct { BPy_Interface0D py_if0D; - ViewVertex *vv; + Freestyle::ViewVertex *vv; } BPy_ViewVertex; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp index 5e63e190356..da8cd9d2395 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp @@ -29,6 +29,8 @@ extern "C" { #endif +using namespace Freestyle; + /////////////////////////////////////////////////////////////////////////////////////////// //------------------------INSTANCE METHODS ---------------------------------- diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h index 44da0ed212a..d635a8541db 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h @@ -38,7 +38,7 @@ extern PyTypeObject StrokeVertex_Type; /*---------------------------Python BPy_StrokeVertex structure definition----------*/ typedef struct { BPy_CurvePoint py_cp; - StrokeVertex *sv; + Freestyle::StrokeVertex *sv; } BPy_StrokeVertex; /*---------------------------Python BPy_StrokeVertex visible prototypes-----------*/ diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp index ed10f3e0af5..90522ba7f9f 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp @@ -27,6 +27,8 @@ extern "C" { #endif +using namespace Freestyle; + /////////////////////////////////////////////////////////////////////////////////////////// /*----------------------NonTVertex methods ----------------------------*/ diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h index 43f2c2b4a5c..6d84533aa6b 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h @@ -37,7 +37,7 @@ extern PyTypeObject NonTVertex_Type; /*---------------------------Python BPy_NonTVertex structure definition----------*/ typedef struct { BPy_ViewVertex py_vv; - NonTVertex *ntv; + Freestyle::NonTVertex *ntv; } BPy_NonTVertex; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp index 596eec7a4e5..5f90f0fa7a9 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp @@ -30,6 +30,8 @@ extern "C" { #endif +using namespace Freestyle; + /////////////////////////////////////////////////////////////////////////////////////////// /*----------------------TVertex methods ----------------------------*/ diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h index 253934bb4e7..009ba24d1e8 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h @@ -37,7 +37,7 @@ extern PyTypeObject TVertex_Type; /*---------------------------Python BPy_TVertex structure definition----------*/ typedef struct { BPy_ViewVertex py_vv; - TVertex *tv; + Freestyle::TVertex *tv; } BPy_TVertex; /////////////////////////////////////////////////////////////////////////////////////////// |