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:
Diffstat (limited to 'source/blender/freestyle/intern/python')
-rw-r--r--source/blender/freestyle/intern/python/BPy_BBox.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_Convert.cpp130
-rw-r--r--source/blender/freestyle/intern/python/BPy_Convert.h30
-rw-r--r--source/blender/freestyle/intern/python/BPy_Freestyle.cpp2
-rw-r--r--source/blender/freestyle/intern/python/BPy_Freestyle.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsMaterial.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_Id.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_IntegrationType.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface0D.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface1D.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_Iterator.cpp6
-rw-r--r--source/blender/freestyle/intern/python/BPy_Iterator.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_MediumType.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_Nature.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_Noise.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_Operators.cpp283
-rw-r--r--source/blender/freestyle/intern/python/BPy_Operators.h34
-rw-r--r--source/blender/freestyle/intern/python/BPy_SShape.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeAttribute.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeShader.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewMap.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewShape.h2
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h2
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h2
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h2
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h2
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h2
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h2
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h2
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h2
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h2
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h2
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h2
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h2
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp13
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h2
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h2
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h2
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp10
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h2
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp7
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h2
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp10
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h2
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp9
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h2
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp9
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h2
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp12
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h2
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp13
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h2
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h2
164 files changed, 668 insertions, 201 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_BBox.h b/source/blender/freestyle/intern/python/BPy_BBox.h
index 88bba3301bb..90fbc565b33 100644
--- a/source/blender/freestyle/intern/python/BPy_BBox.h
+++ b/source/blender/freestyle/intern/python/BPy_BBox.h
@@ -15,7 +15,7 @@ extern "C" {
extern PyTypeObject BBox_Type;
-#define BPy_BBox_Check(v) (( (PyObject *) v)->ob_type == &BBox_Type)
+#define BPy_BBox_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &BBox_Type) )
/*---------------------------Python BPy_BBox structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h
index dd192877675..8b92fbe4e35 100644
--- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h
+++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject BinaryPredicate0D_Type;
-#define BPy_BinaryPredicate0D_Check(v) (( (PyObject *) v)->ob_type == &BinaryPredicate0D_Type)
+#define BPy_BinaryPredicate0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &BinaryPredicate0D_Type) )
/*---------------------------Python BPy_BinaryPredicate0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h
index 035e2b6cb17..66f5e2fd4df 100644
--- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h
+++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject BinaryPredicate1D_Type;
-#define BPy_BinaryPredicate1D_Check(v) (( (PyObject *) v)->ob_type == &BinaryPredicate1D_Type)
+#define BPy_BinaryPredicate1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &BinaryPredicate1D_Type) )
/*---------------------------Python BPy_BinaryPredicate1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp
index 042d4b7bef0..b541babd752 100644
--- a/source/blender/freestyle/intern/python/BPy_Convert.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp
@@ -5,20 +5,29 @@
#include "BPy_Id.h"
#include "BPy_IntegrationType.h"
#include "BPy_Interface0D.h"
+#include "Interface0D/BPy_CurvePoint.cpp"
#include "Interface0D/CurvePoint/BPy_StrokeVertex.h"
#include "Interface0D/BPy_SVertex.h"
#include "Interface0D/BPy_ViewVertex.h"
#include "Interface1D/BPy_FEdge.h"
#include "Interface1D/BPy_ViewEdge.h"
-#include "Iterator/BPy_Interface0DIterator.h"
-#include "Iterator/BPy_orientedViewEdgeIterator.h"
-#include "Iterator/BPy_StrokeVertexIterator.h"
#include "BPy_Nature.h"
#include "BPy_MediumType.h"
#include "BPy_SShape.h"
#include "BPy_StrokeAttribute.h"
#include "BPy_ViewShape.h"
+#include "Iterator/BPy_AdjacencyIterator.h"
+#include "Iterator/BPy_ChainPredicateIterator.h"
+#include "Iterator/BPy_ChainSilhouetteIterator.h"
+#include "Iterator/BPy_ChainingIterator.h"
+#include "Iterator/BPy_CurvePointIterator.h"
+#include "Iterator/BPy_Interface0DIterator.h"
+#include "Iterator/BPy_SVertexIterator.h"
+#include "Iterator/BPy_StrokeVertexIterator.h"
+#include "Iterator/BPy_ViewEdgeIterator.h"
+#include "Iterator/BPy_orientedViewEdgeIterator.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -161,11 +170,62 @@ PyObject * BPy_ViewShape_from_ViewShape( ViewShape& vs ) {
return py_vs;
}
-PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ) {
- PyObject *py_ove_it = orientedViewEdgeIterator_Type.tp_new( &orientedViewEdgeIterator_Type, 0, 0 );
- ((BPy_orientedViewEdgeIterator *) py_ove_it)->ove_it = new ViewVertexInternal::orientedViewEdgeIterator( ove_it );
+PyObject * BPy_FrsMaterial_from_Material( Material& m ){
+ PyObject *py_m = FrsMaterial_Type.tp_new( &FrsMaterial_Type, 0, 0 );
+ ((BPy_FrsMaterial*) py_m)->m = new Material( m );
- return py_ove_it;
+ return py_m;
+}
+
+PyObject * BPy_IntegrationType_from_IntegrationType( int i ) {
+ PyObject *py_it = IntegrationType_Type.tp_new( &IntegrationType_Type, 0, 0 );
+
+ PyObject *args = PyTuple_New(1);
+ PyTuple_SetItem( args, 0, PyInt_FromLong(i) );
+ IntegrationType_Type.tp_init( py_it, args, 0 );
+ Py_DECREF(args);
+
+ return py_it;
+}
+
+PyObject * BPy_CurvePoint_from_CurvePoint( CurvePoint& cp ) {
+ PyObject *py_cp = CurvePoint_Type.tp_new( &CurvePoint_Type, 0, 0 );
+ ((BPy_CurvePoint*) py_cp)->cp = new CurvePoint( cp );
+
+ return py_cp;
+}
+
+PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewEdge& dve ) {
+ PyObject *py_dve = PyList_New(2);
+
+ PyList_SetItem( py_dve, 0, BPy_ViewEdge_from_ViewEdge(*(dve.first)) );
+ PyList_SetItem( py_dve, 1, PyBool_from_bool(dve.second) );
+
+ return py_dve;
+}
+
+
+//==============================
+// Constants
+//==============================
+
+IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ) {
+ return static_cast<IntegrationType>( PyInt_AsLong(obj) );
+}
+
+Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ) {
+ return static_cast<Stroke::MediumType>( PyInt_AsLong(obj) );
+}
+
+//==============================
+// Iterators
+//==============================
+
+PyObject * BPy_AdjacencyIterator_from_AdjacencyIterator( AdjacencyIterator& a_it ) {
+ PyObject *py_a_it = AdjacencyIterator_Type.tp_new( &AdjacencyIterator_Type, 0, 0 );
+ ((BPy_AdjacencyIterator *) py_a_it)->a_it = new AdjacencyIterator( a_it );
+
+ return py_a_it;
}
PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator& if0D_it ) {
@@ -175,6 +235,13 @@ PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator
return py_if0D_it;
}
+PyObject * BPy_CurvePointIterator_from_CurvePointIterator( CurveInternal::CurvePointIterator& cp_it ) {
+ PyObject *py_cp_it = CurvePointIterator_Type.tp_new( &CurvePointIterator_Type, 0, 0 );
+ ((BPy_CurvePointIterator*) py_cp_it)->cp_it = new CurveInternal::CurvePointIterator( cp_it );
+
+ return py_cp_it;
+}
+
PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::StrokeVertexIterator& sv_it) {
PyObject *py_sv_it = StrokeVertexIterator_Type.tp_new( &StrokeVertexIterator_Type, 0, 0 );
((BPy_StrokeVertexIterator*) py_sv_it)->sv_it = new StrokeInternal::StrokeVertexIterator( sv_it );
@@ -182,33 +249,52 @@ PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::S
return py_sv_it;
}
-PyObject * BPy_FrsMaterial_from_Material( Material& m ){
- PyObject *py_m = FrsMaterial_Type.tp_new( &FrsMaterial_Type, 0, 0 );
- ((BPy_FrsMaterial*) py_m)->m = new Material( m );
+PyObject * BPy_SVertexIterator_from_SVertexIterator( ViewEdgeInternal::SVertexIterator& sv_it ) {
+ PyObject *py_sv_it = SVertexIterator_Type.tp_new( &SVertexIterator_Type, 0, 0 );
+ ((BPy_SVertexIterator*) py_sv_it)->sv_it = new ViewEdgeInternal::SVertexIterator( sv_it );
- return py_m;
+ return py_sv_it;
}
-PyObject * BPy_IntegrationType_from_IntegrationType( int i ) {
- PyObject *py_it = IntegrationType_Type.tp_new( &IntegrationType_Type, 0, 0 );
+PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ) {
+ PyObject *py_ove_it = orientedViewEdgeIterator_Type.tp_new( &orientedViewEdgeIterator_Type, 0, 0 );
+ ((BPy_orientedViewEdgeIterator *) py_ove_it)->ove_it = new ViewVertexInternal::orientedViewEdgeIterator( ove_it );
- PyObject *args = PyTuple_New(1);
- PyTuple_SetItem( args, 0, PyInt_FromLong(i) );
- IntegrationType_Type.tp_init( py_it, args, 0 );
- Py_DECREF(args);
+ return py_ove_it;
+}
- return py_it;
+PyObject * BPy_ViewEdgeIterator_from_ViewEdgeIterator( ViewEdgeInternal::ViewEdgeIterator& ve_it ) {
+ PyObject *py_ve_it = ViewEdgeIterator_Type.tp_new( &ViewEdgeIterator_Type, 0, 0 );
+ ((BPy_ViewEdgeIterator*) py_ve_it)->ve_it = new ViewEdgeInternal::ViewEdgeIterator( ve_it );
+
+ return py_ve_it;
}
-IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ) {
- return static_cast<IntegrationType>( PyInt_AsLong(obj) );
+PyObject * BPy_ChainingIterator_from_ChainingIterator( ChainingIterator& c_it ) {
+ PyObject *py_c_it = ChainingIterator_Type.tp_new( &ChainingIterator_Type, 0, 0 );
+ ((BPy_ChainingIterator*) py_c_it)->c_it = new ChainingIterator( c_it );
+
+ return py_c_it;
}
-Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ) {
- return static_cast<Stroke::MediumType>( PyInt_AsLong(obj) );
+PyObject * BPy_ChainPredicateIterator_from_ChainPredicateIterator( ChainPredicateIterator& cp_it ) {
+ PyObject *py_cp_it = ChainPredicateIterator_Type.tp_new( &ChainPredicateIterator_Type, 0, 0 );
+ ((BPy_ChainPredicateIterator*) py_cp_it)->cp_it = new ChainPredicateIterator( cp_it );
+
+ return py_cp_it;
+}
+
+PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator( ChainSilhouetteIterator& cs_it ) {
+ PyObject *py_cs_it = ChainSilhouetteIterator_Type.tp_new( &ChainSilhouetteIterator_Type, 0, 0 );
+ ((BPy_ChainSilhouetteIterator*) py_cs_it)->cs_it = new ChainSilhouetteIterator( cs_it );
+
+ return py_cs_it;
}
+
+
+
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h
index b43f7bab291..5b613b3c4c3 100644
--- a/source/blender/freestyle/intern/python/BPy_Convert.h
+++ b/source/blender/freestyle/intern/python/BPy_Convert.h
@@ -26,20 +26,24 @@ using namespace Geometry;
// NonTVertex, TVertex, ViewEdge, ViewMap, ViewShape, ViewVertex
#include "../view_map/ViewMap.h"
+// CurvePoint, Curve
+#include "../stroke/Curve.h"
+
+//====== ITERATORS
+
+// AdjacencyIterator, ChainingIterator, ChainSilhouetteIterator, ChainPredicateIterator
+#include "../stroke/ChainingIterators.h"
+
// ViewVertexInternal::orientedViewEdgeIterator
// ViewEdgeInternal::SVertexIterator
// ViewEdgeInternal::ViewEdgeIterator
#include "../view_map/ViewMapIterators.h"
-//##################### IMPORTANT #####################
-// Do not use the following namespaces within this file :
-// - ViewVertexInternal
-// - ViewEdgeInternal
-//##########################################################
// StrokeInternal::StrokeVertexIterator
#include "../stroke/StrokeIterators.h"
-
+// CurveInternal::CurvePointIterator
+#include "../stroke/CurveIterators.h"
#ifdef __cplusplus
extern "C" {
@@ -62,6 +66,8 @@ IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj );
Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj );
PyObject * BPy_BBox_from_BBox( 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_Id_from_Id( Id& id );
PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D );
@@ -77,9 +83,19 @@ PyObject * BPy_ViewVertex_from_ViewVertex_ptr( ViewVertex *vv );
PyObject * BPy_ViewEdge_from_ViewEdge( ViewEdge& ve );
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_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it );
+PyObject * BPy_CurvePointIterator_from_CurvePointIterator( CurveInternal::CurvePointIterator& cp_it );
PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::StrokeVertexIterator& sv_it);
+PyObject * BPy_SVertexIterator_from_SVertexIterator( ViewEdgeInternal::SVertexIterator& sv_it );
+PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it );
+PyObject * BPy_ViewEdgeIterator_from_ViewEdgeIterator( ViewEdgeInternal::ViewEdgeIterator& ve_it );
+PyObject * BPy_ChainingIterator_from_ChainingIterator( ChainingIterator& c_it );
+PyObject * BPy_ChainPredicateIterator_from_ChainPredicateIterator( ChainPredicateIterator& cp_it );
+PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator( ChainSilhouetteIterator& cs_it );
+
+
+
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
index ed35a85068b..85a2783102e 100644
--- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
@@ -11,6 +11,7 @@
#include "BPy_Iterator.h"
#include "BPy_MediumType.h"
#include "BPy_Nature.h"
+#include "BPy_Operators.h"
#include "BPy_Noise.h"
#include "BPy_SShape.h"
#include "BPy_StrokeAttribute.h"
@@ -152,6 +153,7 @@ PyObject *Freestyle_Init( void )
Interface0D_Init( module );
Interface1D_Init( module );
Iterator_Init( module );
+ Operators_Init( module );
Noise_Init( module );
SShape_Init( module );
StrokeAttribute_Init( module );
diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.h b/source/blender/freestyle/intern/python/BPy_Freestyle.h
index 9cdef4df2d2..4990a2e685d 100644
--- a/source/blender/freestyle/intern/python/BPy_Freestyle.h
+++ b/source/blender/freestyle/intern/python/BPy_Freestyle.h
@@ -11,7 +11,7 @@ extern "C" {
extern PyTypeObject Freestyle_Type;
-#define BPy_Freestyle_Check(v) (( (PyObject *) v)->ob_type == &Freestyle_Type)
+#define BPy_Freestyle_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Freestyle_Type) )
/*---------------------------Python BPy_Freestyle structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.h b/source/blender/freestyle/intern/python/BPy_FrsMaterial.h
index 90ed6805974..cb1aa20bb21 100644
--- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.h
+++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject FrsMaterial_Type;
-#define BPy_FrsMaterial_Check(v) (( (PyObject *) v)->ob_type == &FrsMaterial_Type)
+#define BPy_FrsMaterial_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FrsMaterial_Type) )
/*---------------------------Python BPy_FrsMaterial structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_Id.h b/source/blender/freestyle/intern/python/BPy_Id.h
index d5e90a0a3e5..fd9446618b8 100644
--- a/source/blender/freestyle/intern/python/BPy_Id.h
+++ b/source/blender/freestyle/intern/python/BPy_Id.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject Id_Type;
-#define BPy_Id_Check(v) (( (PyObject *) v)->ob_type == &Id_Type)
+#define BPy_Id_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Id_Type) )
/*---------------------------Python BPy_Id structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.h b/source/blender/freestyle/intern/python/BPy_IntegrationType.h
index ab212ac6560..a31fe959996 100644
--- a/source/blender/freestyle/intern/python/BPy_IntegrationType.h
+++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject IntegrationType_Type;
-#define BPy_IntegrationType_Check(v) (( (PyObject *) v)->ob_type == &IntegrationType_Type)
+#define BPy_IntegrationType_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &IntegrationType_Type) )
/*---------------------------Python BPy_IntegrationType structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.h b/source/blender/freestyle/intern/python/BPy_Interface0D.h
index aaecc6dad94..a55deb80a6f 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface0D.h
+++ b/source/blender/freestyle/intern/python/BPy_Interface0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject Interface0D_Type;
-#define BPy_Interface0D_Check(v) (( (PyObject *) v)->ob_type == &Interface0D_Type)
+#define BPy_Interface0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Interface0D_Type) )
/*---------------------------Python BPy_Interface0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.h b/source/blender/freestyle/intern/python/BPy_Interface1D.h
index c49a8c130b0..14971bf88f5 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface1D.h
+++ b/source/blender/freestyle/intern/python/BPy_Interface1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject Interface1D_Type;
-#define BPy_Interface1D_Check(v) (( (PyObject *) v)->ob_type == &Interface1D_Type)
+#define BPy_Interface1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Interface1D_Type) )
/*---------------------------Python BPy_Interface1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp
index b946e0a9a9a..cf6d8ed4877 100644
--- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp
@@ -227,6 +227,12 @@ PyObject * Iterator_isEnd(BPy_Iterator* self) {
return PyBool_from_bool( self->it->isEnd() );
}
+//%rename(getObject) Interface0DIterator::operator*
+PyObject * Iterator_getObject(BPy_Iterator* self) {
+ return PyBool_from_bool( self->it->isEnd() );
+}
+
+
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.h b/source/blender/freestyle/intern/python/BPy_Iterator.h
index 0f92c3b7f28..bad39806163 100644
--- a/source/blender/freestyle/intern/python/BPy_Iterator.h
+++ b/source/blender/freestyle/intern/python/BPy_Iterator.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject Iterator_Type;
-#define BPy_Iterator_Check(v) (( (PyObject *) v)->ob_type == &Iterator_Type)
+#define BPy_Iterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Iterator_Type) )
/*---------------------------Python BPy_Iterator structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_MediumType.h b/source/blender/freestyle/intern/python/BPy_MediumType.h
index d56594e0f68..9b4ff5a2fd9 100644
--- a/source/blender/freestyle/intern/python/BPy_MediumType.h
+++ b/source/blender/freestyle/intern/python/BPy_MediumType.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject MediumType_Type;
-#define BPy_MediumType_Check(v) (( (PyObject *) v)->ob_type == &MediumType_Type)
+#define BPy_MediumType_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &MediumType_Type) )
/*---------------------------Python BPy_MediumType structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_Nature.h b/source/blender/freestyle/intern/python/BPy_Nature.h
index 7473869158f..493a4f78599 100644
--- a/source/blender/freestyle/intern/python/BPy_Nature.h
+++ b/source/blender/freestyle/intern/python/BPy_Nature.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject Nature_Type;
-#define BPy_Nature_Check(v) (( (PyObject *) v)->ob_type == &Nature_Type)
+#define BPy_Nature_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Nature_Type) )
/*---------------------------Python BPy_Nature structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_Noise.h b/source/blender/freestyle/intern/python/BPy_Noise.h
index b9b66d34e94..5dc8a1a4bd1 100644
--- a/source/blender/freestyle/intern/python/BPy_Noise.h
+++ b/source/blender/freestyle/intern/python/BPy_Noise.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject Noise_Type;
-#define BPy_Noise_Check(v) (( (PyObject *) v)->ob_type == &Noise_Type)
+#define BPy_Noise_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Noise_Type) )
/*---------------------------Python BPy_Noise structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp
index efae258d5ee..2d883363998 100644
--- a/source/blender/freestyle/intern/python/BPy_Operators.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp
@@ -1,57 +1,304 @@
-PyObject *Operators_select(PyObject *self , PyObject *args) {
-}
+#include "BPy_Operators.h"
+#include "BPy_BinaryPredicate1D.h"
+#include "BPy_UnaryPredicate0D.h"
+#include "BPy_UnaryPredicate1D.h"
+#include "UnaryFunction0D/BPy_UnaryFunction0DDouble.h"
+#include "UnaryFunction1D/BPy_UnaryFunction1DVoid.h"
+#include "Iterator/BPy_ViewEdgeIterator.h"
+#include "Iterator/BPy_ChainingIterator.h"
+#include "BPy_StrokeShader.h"
-PyObject *Operators_chain(PyObject *self, PyObject *args) {
-}
+#ifdef __cplusplus
+extern "C" {
+#endif
+///////////////////////////////////////////////////////////////////////////////////////////
-PyObject *Operators_bidirectionalChain(PyObject *self, PyObject *args) {
-}
+/*--------------- Python API function prototypes for Operators instance -----------*/
+static void Operators___dealloc__(BPy_Operators *self);
+static PyObject * Operators_select(BPy_Operators* self, PyObject *args);
-PyObject *Operators_sequentialSplit(PyObject *self, PyObject *args) {
-}
+/*----------------------Operators instance definitions ----------------------------*/
+static PyMethodDef BPy_Operators_methods[] = {
+ {"select", ( PyCFunction ) Operators_select, METH_VARARGS | METH_STATIC, "(UnaryPredicate1D up1D )Selects the ViewEdges of the ViewMap verifying a specified condition. "},
+ {NULL, NULL, 0, NULL}
+};
+
+/*-----------------------BPy_Operators type definition ------------------------------*/
+
+PyTypeObject Operators_Type = {
+ PyObject_HEAD_INIT( NULL )
+ 0, /* ob_size */
+ "Operators", /* tp_name */
+ sizeof( BPy_Operators ), /* tp_basicsize */
+ 0, /* tp_itemsize */
+
+ /* methods */
+ (destructor)Operators___dealloc__, /* tp_dealloc */
+ NULL, /* printfunc tp_print; */
+ NULL, /* getattrfunc tp_getattr; */
+ NULL, /* setattrfunc tp_setattr; */
+ NULL, /* tp_compare */
+ NULL, /* tp_repr */
+
+ /* Method suites for standard classes */
+
+ NULL, /* PyNumberMethods *tp_as_number; */
+ NULL, /* PySequenceMethods *tp_as_sequence; */
+ NULL, /* PyMappingMethods *tp_as_mapping; */
+
+ /* More standard operations (here for binary compatibility) */
+
+ NULL, /* hashfunc tp_hash; */
+ NULL, /* ternaryfunc tp_call; */
+ NULL, /* reprfunc tp_str; */
+ NULL, /* getattrofunc tp_getattro; */
+ NULL, /* setattrofunc tp_setattro; */
+
+ /* Functions to access object as input/output buffer */
+ NULL, /* PyBufferProcs *tp_as_buffer; */
+
+ /*** Flags to define presence of optional/expanded features ***/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
+
+ NULL, /* char *tp_doc; Documentation string */
+ /*** Assigned meaning in release 2.0 ***/
+ /* call function for all accessible objects */
+ NULL, /* traverseproc tp_traverse; */
+
+ /* delete references to contained objects */
+ NULL, /* inquiry tp_clear; */
+ /*** Assigned meaning in release 2.1 ***/
+ /*** rich comparisons ***/
+ NULL, /* richcmpfunc tp_richcompare; */
-PyObject *Operators_recursiveSplit(PyObject *self, PyObject *args) {
+ /*** weak reference enabler ***/
+ 0, /* long tp_weaklistoffset; */
+
+ /*** Added in release 2.2 ***/
+ /* Operatorss */
+ NULL, /* getiterfunc tp_iter; */
+ NULL, /* iternextfunc tp_iternext; */
+
+ /*** Attribute descriptor and subclassing stuff ***/
+ BPy_Operators_methods, /* struct PyMethodDef *tp_methods; */
+ NULL, /* struct PyMemberDef *tp_members; */
+ NULL, /* struct PyGetSetDef *tp_getset; */
+ NULL, /* struct _typeobject *tp_base; */
+ NULL, /* PyObject *tp_dict; */
+ NULL, /* descrgetfunc tp_descr_get; */
+ NULL, /* descrsetfunc tp_descr_set; */
+ 0, /* long tp_dictoffset; */
+ NULL, /* initproc tp_init; */
+ NULL, /* allocfunc tp_alloc; */
+ PyType_GenericNew, /* newfunc tp_new; */
+
+ /* Low-level free-memory routine */
+ NULL, /* freefunc tp_free; */
+
+ /* For PyObject_IS_GC */
+ NULL, /* inquiry tp_is_gc; */
+ NULL, /* PyObject *tp_bases; */
+
+ /* method resolution order */
+ NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_cache; */
+ NULL, /* PyObject *tp_subclasses; */
+ NULL, /* PyObject *tp_weaklist; */
+ NULL
+};
+
+//-------------------MODULE INITIALIZATION--------------------------------
+PyMODINIT_FUNC Operators_Init( PyObject *module )
+{
+ if( module == NULL )
+ return;
+
+ if( PyType_Ready( &Operators_Type ) < 0 )
+ return;
+ Py_INCREF( &Operators_Type );
+ PyModule_AddObject(module, "Operators", (PyObject *)&Operators_Type);
+
}
+//------------------------INSTANCE METHODS ----------------------------------
-PyObject *Operators_sort(PyObject *self , PyObject *args) {
+void Operators___dealloc__(BPy_Operators* self)
+{
+ self->ob_type->tp_free((PyObject*)self);
}
+PyObject * Operators_select(BPy_Operators* self, PyObject *args)
+{
+ PyObject *obj = 0;
-PyObject *Operators_create(PyObject *self , PyObject *args) {
+ if(!( PyArg_ParseTuple(args, "O", &obj) &&
+ BPy_UnaryPredicate1D_Check(obj) && ((BPy_UnaryPredicate1D *) obj)->up1D )) {
+ cout << "ERROR: Operators_select" << endl;
+ Py_RETURN_NONE;
+ }
+
+ Operators::select(*( ((BPy_UnaryPredicate1D *) obj)->up1D ));
+
+ Py_RETURN_NONE;
}
+PyObject * Operators_chain(BPy_Operators* self, PyObject *args)
+{
+ PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0;
-PyObject *Operators_getViewEdgeFromIndex(PyObject *self , PyObject *args) {
+ if(!( PyArg_ParseTuple(args, "OO|O", &obj1, &obj2, &obj3) &&
+ BPy_ViewEdgeIterator_Check(obj1) && ((BPy_ViewEdgeIterator *) obj1)->ve_it &&
+ BPy_UnaryPredicate1D_Check(obj2) && ((BPy_UnaryPredicate1D *) obj2)->up1D )) {
+ cout << "ERROR: Operators_chain" << endl;
+ Py_RETURN_NONE;
+ }
+ if( !obj3 ) {
+
+ Operators::chain( *( ((BPy_ViewEdgeIterator *) obj1)->ve_it ),
+ *( ((BPy_UnaryPredicate1D *) obj2)->up1D ) );
+
+ } else if( BPy_UnaryFunction1DVoid_Check(obj3) && ((BPy_UnaryFunction1DVoid *) obj3)->uf1D_void ) {
+
+ Operators::chain( *( ((BPy_ViewEdgeIterator *) obj1)->ve_it ),
+ *( ((BPy_UnaryPredicate1D *) obj2)->up1D ),
+ *( ((BPy_UnaryFunction1DVoid *) obj3)->uf1D_void ) );
+
+ }
+
+ Py_RETURN_NONE;
}
+PyObject * Operators_bidirectionalChain(BPy_Operators* self, PyObject *args)
+{
+ PyObject *obj1 = 0, *obj2 = 0;
+
+ if(!( PyArg_ParseTuple(args, "O|O", &obj1, &obj2) &&
+ BPy_ChainingIterator_Check(obj1) && ((BPy_ChainingIterator *) obj1)->c_it )) {
+ cout << "ERROR: Operators_bidirectionalChain" << endl;
+ Py_RETURN_NONE;
+ }
-PyObject *Operators_getChainFromIndex(PyObject *self , PyObject *args) {
+ if( !obj2 ) {
+
+ Operators::bidirectionalChain( *( ((BPy_ChainingIterator *) obj1)->c_it ) );
+
+ } else if( BPy_UnaryPredicate1D_Check(obj2) && ((BPy_UnaryPredicate1D *) obj2)->up1D ) {
+
+ Operators::bidirectionalChain( *( ((BPy_ChainingIterator *) obj1)->c_it ),
+ *( ((BPy_UnaryPredicate1D *) obj2)->up1D ) );
+
+ }
+
+ Py_RETURN_NONE;
}
+PyObject * Operators_sequentialSplit(BPy_Operators* self, PyObject *args)
+{
+ PyObject *obj1 = 0, *obj2 = 0;
+ float f3 = 0.0;
+
+ if(!( PyArg_ParseTuple(args, "O|Of", &obj1, &obj2, &f3) &&
+ BPy_UnaryPredicate0D_Check(obj1) && ((BPy_UnaryPredicate0D *) obj1)->up0D )) {
+ cout << "ERROR: Operators_sequentialSplit" << endl;
+ Py_RETURN_NONE;
+ }
-PyObject *Operators_getStrokeFromIndex(PyObject *self , PyObject *args) {
+ if( obj2 && BPy_UnaryPredicate0D_Check(obj2) ) {
+
+ Operators::sequentialSplit( *( ((BPy_UnaryPredicate0D *) obj1)->up0D ),
+ *( ((BPy_UnaryPredicate0D *) obj2)->up0D ),
+ f3 );
+
+ } else {
+
+ float f = ( obj2 && PyFloat_Check(obj2) ) ? PyFloat_AsDouble(obj2) : 0.0;
+
+ Operators::sequentialSplit( *( ((BPy_UnaryPredicate0D *) obj1)->up0D ), f );
+
+ }
+
+ Py_RETURN_NONE;
}
+PyObject * Operators_recursiveSplit(BPy_Operators* self, PyObject *args)
+{
+ PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0;
+ float f4 = 0.0;
-PyObject *Operators_getViewEdgesSize(PyObject *self , PyObject *args) {
+ if(!( PyArg_ParseTuple(args, "OO|Of", &obj1, &obj2, &obj3, &f4) &&
+ BPy_UnaryFunction0DDouble_Check(obj1) && ((BPy_UnaryFunction0DDouble *) obj1)->uf0D_double )) {
+ cout << "ERROR: Operators_recursiveSplit" << endl;
+ Py_RETURN_NONE;
+ }
+
+ if( BPy_UnaryPredicate1D_Check(obj2) && ((BPy_UnaryPredicate1D *) obj2)->up1D ) {
+
+ float f = ( obj3 && PyFloat_Check(obj3) ) ? PyFloat_AsDouble(obj3) : 0.0;
+
+ Operators::recursiveSplit( *( ((BPy_UnaryFunction0DDouble *) obj1)->uf0D_double ),
+ *( ((BPy_UnaryPredicate1D *) obj2)->up1D ),
+ f );
+
+ } else if( BPy_UnaryPredicate0D_Check(obj2) && ((BPy_UnaryPredicate0D *) obj2)->up0D &&
+ BPy_UnaryPredicate1D_Check(obj3) && ((BPy_UnaryPredicate1D *) obj3)->up1D ) {
+
+ Operators::recursiveSplit( *( ((BPy_UnaryFunction0DDouble *) obj1)->uf0D_double ),
+ *( ((BPy_UnaryPredicate0D *) obj2)->up0D ),
+ *( ((BPy_UnaryPredicate1D *) obj3)->up1D ),
+ f4 );
+
+ }
+
+ Py_RETURN_NONE;
}
+PyObject * Operators_sort(BPy_Operators* self, PyObject *args)
+{
+ PyObject *obj = 0;
+
+ if(!( PyArg_ParseTuple(args, "O", &obj) &&
+ BPy_BinaryPredicate1D_Check(obj) && ((BPy_BinaryPredicate1D *) obj)->bp1D )) {
+ cout << "ERROR: Operators_sort" << endl;
+ Py_RETURN_NONE;
+ }
-PyObject *Operators_getChainsSize(PyObject *self , PyObject *args) {
+ Operators::sort(*( ((BPy_BinaryPredicate1D *) obj)->bp1D ));
+
+ Py_RETURN_NONE;
}
+PyObject * Operators_create(BPy_Operators* self, PyObject *args)
+{
+ PyObject *obj1 = 0, *obj2 = 0;
+
+ if(!( PyArg_ParseTuple(args, "OO", &obj1, &obj2) &&
+ BPy_UnaryPredicate1D_Check(obj1) && ((BPy_UnaryPredicate1D *) obj1)->up1D &&
+ PyList_Check(obj2) && PyList_Size(obj2) > 0 )) {
+ cout << "ERROR: Operators_create" << endl;
+ Py_RETURN_NONE;
+ }
+
+ vector<StrokeShader *> shaders;
+ for( int i = 0; i < PyList_Size(obj2); i++) {
+ PyObject *py_ss = PyList_GetItem(obj2,i);
+ if( BPy_StrokeShader_Check(py_ss) )
+ shaders.push_back( ((BPy_StrokeShader *) py_ss)->ss );
+ }
+
+ Operators::create( *( ((BPy_UnaryPredicate1D *) obj1)->up1D ), shaders);
-PyObject *Operators_getStrokesSize(PyObject *self , PyObject *args) {
+ Py_RETURN_NONE;
}
+///////////////////////////////////////////////////////////////////////////////////////////
- PyObject *delete_Operators(PyObject *self , PyObject *args) {
+#ifdef __cplusplus
}
+#endif
diff --git a/source/blender/freestyle/intern/python/BPy_Operators.h b/source/blender/freestyle/intern/python/BPy_Operators.h
new file mode 100644
index 00000000000..0af40551cf8
--- /dev/null
+++ b/source/blender/freestyle/intern/python/BPy_Operators.h
@@ -0,0 +1,34 @@
+#ifndef FREESTYLE_PYTHON_OPERATORS_H
+#define FREESTYLE_PYTHON_OPERATORS_H
+
+#include "../stroke/Operators.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject Operators_Type;
+
+#define BPy_Operators_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Operators_Type) )
+
+/*---------------------------Python BPy_Operators structure definition----------*/
+typedef struct {
+ PyObject_HEAD
+} BPy_Operators;
+
+/*---------------------------Python BPy_Operators visible prototypes-----------*/
+
+PyMODINIT_FUNC Operators_Init( PyObject *module );
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREESTYLE_PYTHON_OPERATORS_H */
diff --git a/source/blender/freestyle/intern/python/BPy_SShape.h b/source/blender/freestyle/intern/python/BPy_SShape.h
index 2064b6c4b64..5ca4d9abefe 100644
--- a/source/blender/freestyle/intern/python/BPy_SShape.h
+++ b/source/blender/freestyle/intern/python/BPy_SShape.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject SShape_Type;
-#define BPy_SShape_Check(v) (( (PyObject *) v)->ob_type == &SShape_Type)
+#define BPy_SShape_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &SShape_Type) )
/*---------------------------Python BPy_SShape structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.h b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.h
index a0828e4f668..a2100c3b0f6 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.h
+++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject StrokeAttribute_Type;
-#define BPy_StrokeAttribute_Check(v) (( (PyObject *) v)->ob_type == &StrokeAttribute_Type)
+#define BPy_StrokeAttribute_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &StrokeAttribute_Type) )
/*---------------------------Python BPy_StrokeAttribute structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.h b/source/blender/freestyle/intern/python/BPy_StrokeShader.h
index 091eaa50383..5ee89a35875 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeShader.h
+++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.h
@@ -18,7 +18,7 @@ extern "C" {
extern PyTypeObject StrokeShader_Type;
-#define BPy_StrokeShader_Check(v) (( (PyObject *) v)->ob_type == &StrokeShader_Type)
+#define BPy_StrokeShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &StrokeShader_Type) )
/*---------------------------Python BPy_StrokeShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h
index e4854c58b45..0ab0bfbdc2e 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h
+++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject UnaryFunction0D_Type;
-#define BPy_UnaryFunction0D_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0D_Type)
+#define BPy_UnaryFunction0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0D_Type) )
/*---------------------------Python BPy_UnaryFunction0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h
index 21cece45fa4..f33fcf48da4 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h
+++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject UnaryFunction1D_Type;
-#define BPy_UnaryFunction1D_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1D_Type)
+#define BPy_UnaryFunction1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1D_Type) )
/*---------------------------Python BPy_UnaryFunction1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h
index 1f72ba5e86b..c242a71d1a3 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h
+++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject UnaryPredicate0D_Type;
-#define BPy_UnaryPredicate0D_Check(v) (( (PyObject *) v)->ob_type == &UnaryPredicate0D_Type)
+#define BPy_UnaryPredicate0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryPredicate0D_Type) )
/*---------------------------Python BPy_UnaryPredicate0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h
index 509d81f6937..ac5451d3b0e 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h
+++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject UnaryPredicate1D_Type;
-#define BPy_UnaryPredicate1D_Check(v) (( (PyObject *) v)->ob_type == &UnaryPredicate1D_Type)
+#define BPy_UnaryPredicate1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryPredicate1D_Type) )
/*---------------------------Python BPy_UnaryPredicate1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.h b/source/blender/freestyle/intern/python/BPy_ViewMap.h
index 841b5d46f07..f76f09a4c75 100644
--- a/source/blender/freestyle/intern/python/BPy_ViewMap.h
+++ b/source/blender/freestyle/intern/python/BPy_ViewMap.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ViewMap_Type;
-#define BPy_ViewMap_Check(v) (( (PyObject *) v)->ob_type == &ViewMap_Type)
+#define BPy_ViewMap_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ViewMap_Type) )
/*---------------------------Python BPy_ViewMap structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.h b/source/blender/freestyle/intern/python/BPy_ViewShape.h
index 20490cd71aa..a7d01c098d2 100644
--- a/source/blender/freestyle/intern/python/BPy_ViewShape.h
+++ b/source/blender/freestyle/intern/python/BPy_ViewShape.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ViewShape_Type;
-#define BPy_ViewShape_Check(v) (( (PyObject *) v)->ob_type == &ViewShape_Type)
+#define BPy_ViewShape_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ViewShape_Type) )
/*---------------------------Python BPy_ViewShape structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h
index 7e090fc92d3..a8d4aad88aa 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject FalseBP1D_Type;
-#define BPy_FalseBP1D_Check(v) (( (PyObject *) v)->ob_type == &FalseBP1D_Type)
+#define BPy_FalseBP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FalseBP1D_Type) )
/*---------------------------Python BPy_FalseBP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h
index e499067d05e..d5bce5b150d 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject Length2DBP1D_Type;
-#define BPy_Length2DBP1D_Check(v) (( (PyObject *) v)->ob_type == &Length2DBP1D_Type)
+#define BPy_Length2DBP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Length2DBP1D_Type) )
/*---------------------------Python BPy_Length2DBP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h
index 31e47040bcb..71065d4ceeb 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject SameShapeIdBP1D_Type;
-#define BPy_SameShapeIdBP1D_Check(v) (( (PyObject *) v)->ob_type == &SameShapeIdBP1D_Type)
+#define BPy_SameShapeIdBP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &SameShapeIdBP1D_Type) )
/*---------------------------Python BPy_SameShapeIdBP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h
index a975fe0b662..7d809e1fe65 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject TrueBP1D_Type;
-#define BPy_TrueBP1D_Check(v) (( (PyObject *) v)->ob_type == &TrueBP1D_Type)
+#define BPy_TrueBP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TrueBP1D_Type) )
/*---------------------------Python BPy_TrueBP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h
index 16fe71dee07..23d27e118a9 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ViewMapGradientNormBP1D_Type;
-#define BPy_ViewMapGradientNormBP1D_Check(v) (( (PyObject *) v)->ob_type == &ViewMapGradientNormBP1D_Type)
+#define BPy_ViewMapGradientNormBP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ViewMapGradientNormBP1D_Type) )
/*---------------------------Python BPy_ViewMapGradientNormBP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h
index c2a8023b745..b4c22645503 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h
@@ -14,7 +14,7 @@ extern "C" {
extern PyTypeObject CurvePoint_Type;
-#define BPy_CurvePoint_Check(v) (( (PyObject *) v)->ob_type == &CurvePoint_Type)
+#define BPy_CurvePoint_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &CurvePoint_Type) )
/*---------------------------Python BPy_CurvePoint structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h
index 95b7d833d65..7d310f2b7dc 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h
@@ -15,7 +15,7 @@ extern "C" {
extern PyTypeObject SVertex_Type;
-#define BPy_SVertex_Check(v) (( (PyObject *) v)->ob_type == &SVertex_Type)
+#define BPy_SVertex_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &SVertex_Type) )
/*---------------------------Python BPy_SVertex structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h
index 592a46186c2..26c06b50d71 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h
@@ -14,7 +14,7 @@ extern "C" {
extern PyTypeObject ViewVertex_Type;
-#define BPy_ViewVertex_Check(v) (( (PyObject *) v)->ob_type == &ViewVertex_Type)
+#define BPy_ViewVertex_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ViewVertex_Type) )
/*---------------------------Python BPy_ViewVertex structure definition----------*/
typedef struct {
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 f1c54ed0041..2a84e2480f0 100644
--- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h
+++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h
@@ -14,7 +14,7 @@ extern "C" {
extern PyTypeObject StrokeVertex_Type;
-#define BPy_StrokeVertex_Check(v) (( (PyObject *) v)->ob_type == &StrokeVertex_Type)
+#define BPy_StrokeVertex_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &StrokeVertex_Type) )
/*---------------------------Python BPy_StrokeVertex structure definition----------*/
typedef struct {
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 13b520d81db..071194d2d42 100644
--- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h
+++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h
@@ -14,7 +14,7 @@ extern "C" {
extern PyTypeObject NonTVertex_Type;
-#define BPy_NonTVertex_Check(v) (( (PyObject *) v)->ob_type == &NonTVertex_Type)
+#define BPy_NonTVertex_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &NonTVertex_Type) )
/*---------------------------Python BPy_NonTVertex structure definition----------*/
typedef struct {
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 a4f564446ef..12fe5c0cb43 100644
--- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h
+++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h
@@ -14,7 +14,7 @@ extern "C" {
extern PyTypeObject TVertex_Type;
-#define BPy_TVertex_Check(v) (( (PyObject *) v)->ob_type == &TVertex_Type)
+#define BPy_TVertex_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TVertex_Type) )
/*---------------------------Python BPy_TVertex structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h b/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h
index fd19612261a..fd29a7bf4f1 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h
@@ -14,7 +14,7 @@ extern "C" {
extern PyTypeObject Curve_Type;
-#define BPy_Curve_Check(v) (( (PyObject *) v)->ob_type == &Curve_Type)
+#define BPy_Curve_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Curve_Type) )
/*---------------------------Python BPy_Curve structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h
index c54dbee98b7..9d13145aaf2 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h
@@ -14,7 +14,7 @@ extern "C" {
extern PyTypeObject FEdge_Type;
-#define BPy_FEdge_Check(v) (( (PyObject *) v)->ob_type == &FEdge_Type)
+#define BPy_FEdge_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FEdge_Type) )
/*---------------------------Python BPy_FEdge structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h
index a7e7455b764..ead377377e8 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h
@@ -15,7 +15,7 @@ extern "C" {
extern PyTypeObject ViewEdge_Type;
-#define BPy_ViewEdge_Check(v) (( (PyObject *) v)->ob_type == &ViewEdge_Type)
+#define BPy_ViewEdge_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ViewEdge_Type) )
/*---------------------------Python BPy_ViewEdge structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h
index eaf80033098..ade70c47f25 100644
--- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h
+++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h
@@ -14,7 +14,7 @@ extern "C" {
extern PyTypeObject Chain_Type;
-#define BPy_Chain_Check(v) (( (PyObject *) v)->ob_type == &Chain_Type)
+#define BPy_Chain_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Chain_Type) )
/*---------------------------Python BPy_Chain structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h
index d08ef006941..84b01e27c21 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h
@@ -14,7 +14,7 @@ extern "C" {
extern PyTypeObject FEdgeSharp_Type;
-#define BPy_FEdgeSharp_Check(v) (( (PyObject *) v)->ob_type == &FEdgeSharp_Type)
+#define BPy_FEdgeSharp_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FEdgeSharp_Type) )
/*---------------------------Python BPy_FEdgeSharp structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h
index 6b26f65d81c..d7b44bb1da7 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h
@@ -14,7 +14,7 @@ extern "C" {
extern PyTypeObject FEdgeSmooth_Type;
-#define BPy_FEdgeSmooth_Check(v) (( (PyObject *) v)->ob_type == &FEdgeSmooth_Type)
+#define BPy_FEdgeSmooth_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FEdgeSmooth_Type) )
/*---------------------------Python BPy_FEdgeSmooth structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
index e40f129d3d8..13c8382c3a2 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
@@ -12,8 +12,11 @@ extern "C" {
/*--------------- Python API function prototypes for AdjacencyIterator instance -----------*/
static int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args);
+static PyObject * AdjacencyIterator_getObject(BPy_AdjacencyIterator *self);
+
/*----------------------AdjacencyIterator instance definitions ----------------------------*/
static PyMethodDef BPy_AdjacencyIterator_methods[] = {
+ {"getObject", ( PyCFunction ) AdjacencyIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"},
{NULL, NULL, 0, NULL}
};
@@ -135,6 +138,16 @@ int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args )
}
+PyObject * AdjacencyIterator_getObject(BPy_AdjacencyIterator *self) {
+
+ ViewEdge *ve = self->a_it->operator*();
+ if( ve )
+ return BPy_ViewEdge_from_ViewEdge( *ve );
+
+ Py_RETURN_NONE;
+}
+
+
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h
index de0178f7725..733a9f2fcab 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h
@@ -15,7 +15,7 @@ extern "C" {
extern PyTypeObject AdjacencyIterator_Type;
-#define BPy_AdjacencyIterator_Check(v) (( (PyObject *) v)->ob_type == &AdjacencyIterator_Type)
+#define BPy_AdjacencyIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &AdjacencyIterator_Type) )
/*---------------------------Python BPy_AdjacencyIterator structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h
index c5d32fb01f3..39a794b27f7 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject ChainPredicateIterator_Type;
-#define BPy_ChainPredicateIterator_Check(v) (( (PyObject *) v)->ob_type == &ChainPredicateIterator_Type)
+#define BPy_ChainPredicateIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ChainPredicateIterator_Type) )
/*---------------------------Python BPy_ChainPredicateIterator structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h
index 7e6feb00910..912d397d279 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject ChainSilhouetteIterator_Type;
-#define BPy_ChainSilhouetteIterator_Check(v) (( (PyObject *) v)->ob_type == &ChainSilhouetteIterator_Type)
+#define BPy_ChainSilhouetteIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ChainSilhouetteIterator_Type) )
/*---------------------------Python BPy_ChainSilhouetteIterator structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
index c695e92ec70..525b0697fa7 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
@@ -18,12 +18,15 @@ static PyObject * ChainingIterator_traverse( BPy_ChainingIterator *self, PyObjec
static PyObject * ChainingIterator_getVertex( BPy_ChainingIterator *self );
static PyObject * ChainingIterator_isIncrementing( BPy_ChainingIterator *self );
+static PyObject * ChainingIterator_getObject( BPy_ChainingIterator *self);
+
/*----------------------ChainingIterator instance definitions ----------------------------*/
static PyMethodDef BPy_ChainingIterator_methods[] = {
{"init", ( PyCFunction ) ChainingIterator_init, METH_NOARGS, "() Inits the iterator context. This method is called each time a new chain is started. It can be used to reset some history information that you might want to keep."},
{"traverse", ( PyCFunction ) ChainingIterator_traverse, METH_VARARGS, "(AdjacencyIterator ai) This method iterates over the potential next ViewEdges and returns the one that will be followed next. Returns the next ViewEdge to follow or 0 when the end of the chain is reached. "},
{"getVertex", ( PyCFunction ) ChainingIterator_getVertex, METH_NOARGS, "() Returns the vertex which is the next crossing "},
{"isIncrementing", ( PyCFunction ) ChainingIterator_isIncrementing, METH_NOARGS, "() Returns true if the current iteration is an incrementation."},
+ {"getObject", ( PyCFunction ) ChainingIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"},
{NULL, NULL, 0, NULL}
};
@@ -171,7 +174,14 @@ PyObject *ChainingIterator_isIncrementing( BPy_ChainingIterator *self ) {
return PyBool_from_bool( self->c_it->isIncrementing() );
}
+PyObject * ChainingIterator_getObject( BPy_ChainingIterator *self) {
+
+ ViewEdge *ve = self->c_it->operator*();
+ if( ve )
+ return BPy_ViewEdge_from_ViewEdge( *ve );
+ Py_RETURN_NONE;
+}
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h
index 2994f381c1d..2a00aa8072f 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject ChainingIterator_Type;
-#define BPy_ChainingIterator_Check(v) (( (PyObject *) v)->ob_type == &ChainingIterator_Type)
+#define BPy_ChainingIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ChainingIterator_Type) )
/*---------------------------Python BPy_ChainingIterator structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
index 1f830261739..c02bd0a00fc 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
@@ -1,5 +1,6 @@
#include "BPy_CurvePointIterator.h"
+#include "../BPy_Convert.h"
#include "BPy_Interface0DIterator.h"
#ifdef __cplusplus
@@ -14,12 +15,14 @@ static PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self );
static PyObject * CurvePointIterator_u( BPy_CurvePointIterator *self );
static PyObject * CurvePointIterator_castToInterface0DIterator( BPy_CurvePointIterator *self );
+static PyObject * CurvePointIterator_getObject(BPy_CurvePointIterator *self);
/*----------------------CurvePointIterator instance definitions ----------------------------*/
static PyMethodDef BPy_CurvePointIterator_methods[] = {
{"t", ( PyCFunction ) CurvePointIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."},
{"u", ( PyCFunction ) CurvePointIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."},
{"castToInterface0DIterator", ( PyCFunction ) CurvePointIterator_castToInterface0DIterator, METH_NOARGS, "() Casts this CurvePointIterator into an Interface0DIterator. Useful for any call to a function of the type UnaryFunction0D."},
+ {"getObject", ( PyCFunction ) CurvePointIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"},
{NULL, NULL, 0, NULL}
};
@@ -153,6 +156,10 @@ PyObject * CurvePointIterator_castToInterface0DIterator( BPy_CurvePointIterator
return py_if0D_it;
}
+PyObject * CurvePointIterator_getObject(BPy_CurvePointIterator *self) {
+ return BPy_CurvePoint_from_CurvePoint( self->cp_it->operator*() );
+}
+
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h
index e8f082216de..ad04c7208bb 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h
@@ -15,7 +15,7 @@ extern "C" {
extern PyTypeObject CurvePointIterator_Type;
-#define BPy_CurvePointIterator_Check(v) (( (PyObject *) v)->ob_type == &CurvePointIterator_Type)
+#define BPy_CurvePointIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &CurvePointIterator_Type) )
/*---------------------------Python BPy_CurvePointIterator structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
index c88ba7773ab..92c3a7dfc38 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
@@ -1,5 +1,7 @@
#include "BPy_Interface0DIterator.h"
+#include "../BPy_Convert.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -12,10 +14,13 @@ static int Interface0DIterator___init__(BPy_Interface0DIterator *self, PyObject
static PyObject * Interface0DIterator_t( BPy_Interface0DIterator *self );
static PyObject * Interface0DIterator_u( BPy_Interface0DIterator *self );
+static PyObject * Interface0DIterator_getObject(BPy_Interface0DIterator *self);
+
/*----------------------Interface0DIterator instance definitions ----------------------------*/
static PyMethodDef BPy_Interface0DIterator_methods[] = {
{"t", ( PyCFunction ) Interface0DIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."},
{"u", ( PyCFunction ) Interface0DIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."},
+ {"getObject", ( PyCFunction ) Interface0DIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"},
{NULL, NULL, 0, NULL}
};
@@ -130,6 +135,11 @@ PyObject * Interface0DIterator_u( BPy_Interface0DIterator *self ) {
return PyFloat_FromDouble( self->if0D_it->u() );
}
+PyObject * Interface0DIterator_getObject(BPy_Interface0DIterator *self) {
+ return BPy_Interface0D_from_Interface0D( self->if0D_it->operator*() );
+}
+
+
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h
index 16edb2c3d68..c829d3d9d31 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h
@@ -15,7 +15,7 @@ extern "C" {
extern PyTypeObject Interface0DIterator_Type;
-#define BPy_Interface0DIterator_Check(v) (( (PyObject *) v)->ob_type == &Interface0DIterator_Type)
+#define BPy_Interface0DIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Interface0DIterator_Type) )
/*---------------------------Python BPy_Interface0DIterator structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
index 649447f1db6..383480b8a9d 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
@@ -1,5 +1,6 @@
#include "BPy_SVertexIterator.h"
+#include "../BPy_Convert.h"
#include "../Interface0D/BPy_SVertex.h"
#include "../Interface1D/BPy_FEdge.h"
@@ -15,10 +16,13 @@ static int SVertexIterator___init__(BPy_SVertexIterator *self, PyObject *args);
static PyObject * SVertexIterator_t( BPy_SVertexIterator *self );
static PyObject * SVertexIterator_u( BPy_SVertexIterator *self );
+static PyObject * SVertexIterator_getObject( BPy_SVertexIterator *self);
+
/*----------------------SVertexIterator instance definitions ----------------------------*/
static PyMethodDef BPy_SVertexIterator_methods[] = {
{"t", ( PyCFunction ) SVertexIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."},
{"u", ( PyCFunction ) SVertexIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."},
+ {"getObject", ( PyCFunction ) SVertexIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"},
{NULL, NULL, 0, NULL}
};
@@ -155,6 +159,11 @@ PyObject * SVertexIterator_u( BPy_SVertexIterator *self ) {
return PyFloat_FromDouble( self->sv_it->u() );
}
+PyObject * SVertexIterator_getObject( BPy_SVertexIterator *self) {
+ return BPy_SVertex_from_SVertex( self->sv_it->operator*() );
+}
+
+
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h
index ba6fbf020d0..b40f4d36420 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject SVertexIterator_Type;
-#define BPy_SVertexIterator_Check(v) (( (PyObject *) v)->ob_type == &SVertexIterator_Type)
+#define BPy_SVertexIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &SVertexIterator_Type) )
/*---------------------------Python BPy_SVertexIterator structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
index 1f04be635c5..0b1554a1cb7 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
@@ -1,5 +1,6 @@
#include "BPy_StrokeVertexIterator.h"
+#include "../BPy_Convert.h"
#include "BPy_Interface0DIterator.h"
#ifdef __cplusplus
@@ -14,11 +15,15 @@ static PyObject * StrokeVertexIterator_t( BPy_StrokeVertexIterator *self );
static PyObject * StrokeVertexIterator_u( BPy_StrokeVertexIterator *self );
static PyObject * StrokeVertexIterator_castToInterface0DIterator( BPy_StrokeVertexIterator *self );
+static PyObject * StrokeVertexIterator_getObject( BPy_StrokeVertexIterator *self);
+
+
/*----------------------StrokeVertexIterator instance definitions ----------------------------*/
static PyMethodDef BPy_StrokeVertexIterator_methods[] = {
{"t", ( PyCFunction ) StrokeVertexIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."},
{"u", ( PyCFunction ) StrokeVertexIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."},
{"castToInterface0DIterator", ( PyCFunction ) StrokeVertexIterator_castToInterface0DIterator, METH_NOARGS, "() Casts this StrokeVertexIterator into an Interface0DIterator. Useful for any call to a function of the type UnaryFunction0D."},
+ {"getObject", ( PyCFunction ) StrokeVertexIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"},
{NULL, NULL, 0, NULL}
};
@@ -149,6 +154,10 @@ PyObject * StrokeVertexIterator_castToInterface0DIterator( BPy_StrokeVertexItera
return py_if0D_it;
}
+PyObject * StrokeVertexIterator_getObject( BPy_StrokeVertexIterator *self) {
+ return BPy_StrokeVertex_from_StrokeVertex( self->sv_it->operator*() );
+}
+
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h
index 488a1efea3d..9e95fc0a401 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h
@@ -15,7 +15,7 @@ extern "C" {
extern PyTypeObject StrokeVertexIterator_Type;
-#define BPy_StrokeVertexIterator_Check(v) (( (PyObject *) v)->ob_type == &StrokeVertexIterator_Type)
+#define BPy_StrokeVertexIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &StrokeVertexIterator_Type) )
/*---------------------------Python BPy_StrokeVertexIterator structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
index add10cd1522..1f3e3c05d91 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
@@ -21,6 +21,9 @@ static PyObject * ViewEdgeIterator_getOrientation( BPy_ViewEdgeIterator *self );
static PyObject * ViewEdgeIterator_setOrientation( BPy_ViewEdgeIterator *self, PyObject *args );
static PyObject * ViewEdgeIterator_changeOrientation( BPy_ViewEdgeIterator *self );
+static PyObject * ViewEdgeIterator_getObject(BPy_ViewEdgeIterator *self);
+
+
/*----------------------ViewEdgeIterator instance definitions ----------------------------*/
static PyMethodDef BPy_ViewEdgeIterator_methods[] = {
{"getCurrentEdge", ( PyCFunction ) ViewEdgeIterator_getCurrentEdge, METH_NOARGS, "() Returns the current pointed ViewEdge."},
@@ -30,6 +33,7 @@ static PyMethodDef BPy_ViewEdgeIterator_methods[] = {
{"getOrientation", ( PyCFunction ) ViewEdgeIterator_getOrientation, METH_NOARGS, "() Gets the orientation of the pointed ViewEdge in the iteration. "},
{"setOrientation", ( PyCFunction ) ViewEdgeIterator_setOrientation, METH_VARARGS, "(bool b) Sets the orientation of the pointed ViewEdge in the iteration. "},
{"changeOrientation", ( PyCFunction ) ViewEdgeIterator_changeOrientation, METH_NOARGS, "() Changes the current orientation."},
+ {"getObject", ( PyCFunction ) ViewEdgeIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"},
{NULL, NULL, 0, NULL}
};
@@ -208,6 +212,14 @@ PyObject *ViewEdgeIterator_changeOrientation( BPy_ViewEdgeIterator *self ) {
Py_RETURN_NONE;
}
+PyObject * ViewEdgeIterator_getObject( BPy_ViewEdgeIterator *self) {
+
+ ViewEdge *ve = self->ve_it->operator*();
+ if( ve )
+ return BPy_ViewEdge_from_ViewEdge( *ve );
+
+ Py_RETURN_NONE;
+}
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h
index a86547c5937..dce90efc8cf 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject ViewEdgeIterator_Type;
-#define BPy_ViewEdgeIterator_Check(v) (( (PyObject *) v)->ob_type == &ViewEdgeIterator_Type)
+#define BPy_ViewEdgeIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ViewEdgeIterator_Type) )
/*---------------------------Python BPy_ViewEdgeIterator structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
index ec6850c3b96..0937e04e3a7 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
@@ -1,5 +1,7 @@
#include "BPy_orientedViewEdgeIterator.h"
+#include "../BPy_Convert.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -9,8 +11,12 @@ extern "C" {
/*--------------- Python API function prototypes for orientedViewEdgeIterator instance -----------*/
static int orientedViewEdgeIterator___init__(BPy_orientedViewEdgeIterator *self, PyObject *args);
+static PyObject * orientedViewEdgeIterator_getObject(BPy_orientedViewEdgeIterator *self);
+
+
/*----------------------orientedViewEdgeIterator instance definitions ----------------------------*/
static PyMethodDef BPy_orientedViewEdgeIterator_methods[] = {
+ {"getObject", ( PyCFunction ) orientedViewEdgeIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"},
{NULL, NULL, 0, NULL}
};
@@ -99,9 +105,6 @@ PyTypeObject orientedViewEdgeIterator_Type = {
NULL
};
-//-------------------MODULE INITIALIZATION--------------------------------
-
-
//------------------------INSTANCE METHODS ----------------------------------
int orientedViewEdgeIterator___init__(BPy_orientedViewEdgeIterator *self, PyObject *args )
@@ -121,6 +124,10 @@ int orientedViewEdgeIterator___init__(BPy_orientedViewEdgeIterator *self, PyObje
return 0;
}
+PyObject * orientedViewEdgeIterator_getObject( BPy_orientedViewEdgeIterator *self) {
+ return BPy_directedViewEdge_from_directedViewEdge( self->ove_it->operator*() );
+}
+
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h
index 1c8a25258b7..973d0f2b728 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject orientedViewEdgeIterator_Type;
-#define BPy_orientedViewEdgeIterator_Check(v) (( (PyObject *) v)->ob_type == &orientedViewEdgeIterator_Type)
+#define BPy_orientedViewEdgeIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &orientedViewEdgeIterator_Type) )
/*---------------------------Python BPy_orientedViewEdgeIterator structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h
index 161bdb5db40..35a74c0bda2 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject BackboneStretcherShader_Type;
-#define BPy_BackboneStretcherShader_Check(v) (( (PyObject *) v)->ob_type == &BackboneStretcherShader_Type)
+#define BPy_BackboneStretcherShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &BackboneStretcherShader_Type) )
/*---------------------------Python BPy_BackboneStretcherShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h
index 56443ca26ad..b94ef88acea 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject BezierCurveShader_Type;
-#define BPy_BezierCurveShader_Check(v) (( (PyObject *) v)->ob_type == &BezierCurveShader_Type)
+#define BPy_BezierCurveShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &BezierCurveShader_Type) )
/*---------------------------Python BPy_BezierCurveShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h
index d3a4782c794..c573b0184ad 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject CalligraphicShader_Type;
-#define BPy_CalligraphicShader_Check(v) (( (PyObject *) v)->ob_type == &CalligraphicShader_Type)
+#define BPy_CalligraphicShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &CalligraphicShader_Type)
/*---------------------------Python BPy_CalligraphicShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h
index e4ad2c0e1af..694b847565e 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ColorNoiseShader_Type;
-#define BPy_ColorNoiseShader_Check(v) (( (PyObject *) v)->ob_type == &ColorNoiseShader_Type)
+#define BPy_ColorNoiseShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ColorNoiseShader_Type) )
/*---------------------------Python BPy_ColorNoiseShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h
index 12f7bbca151..b1898ebfecf 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ColorVariationPatternShader_Type;
-#define BPy_ColorVariationPatternShader_Check(v) (( (PyObject *) v)->ob_type == &ColorVariationPatternShader_Type)
+#define BPy_ColorVariationPatternShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ColorVariationPatternShader_Type) )
/*---------------------------Python BPy_ColorVariationPatternShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h
index 0f3ae177d15..30a09d852fd 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ConstantColorShader_Type;
-#define BPy_ConstantColorShader_Check(v) (( (PyObject *) v)->ob_type == &ConstantColorShader_Type)
+#define BPy_ConstantColorShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ConstantColorShader_Type) )
/*---------------------------Python BPy_ConstantColorShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h
index d8cb7239fd9..bb7f3c0f622 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ConstantThicknessShader_Type;
-#define BPy_ConstantThicknessShader_Check(v) (( (PyObject *) v)->ob_type == &ConstantThicknessShader_Type)
+#define BPy_ConstantThicknessShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ConstantThicknessShader_Type) )
/*---------------------------Python BPy_ConstantThicknessShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h
index f712706d2ee..38a8aa2bfe0 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ConstrainedIncreasingThicknessShader_Type;
-#define BPy_ConstrainedIncreasingThicknessShader_Check(v) (( (PyObject *) v)->ob_type == &ConstrainedIncreasingThicknessShader_Type)
+#define BPy_ConstrainedIncreasingThicknessShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ConstrainedIncreasingThicknessShader_Type) )
/*---------------------------Python BPy_ConstrainedIncreasingThicknessShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h
index 2cf032e24ae..e25704c33ba 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GuidingLinesShader_Type;
-#define BPy_GuidingLinesShader_Check(v) (( (PyObject *) v)->ob_type == &GuidingLinesShader_Type)
+#define BPy_GuidingLinesShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GuidingLinesShader_Type) )
/*---------------------------Python BPy_GuidingLinesShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h
index 4ef7f3f239d..9bc82e98098 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject IncreasingColorShader_Type;
-#define BPy_IncreasingColorShader_Check(v) (( (PyObject *) v)->ob_type == &IncreasingColorShader_Type)
+#define BPy_IncreasingColorShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &IncreasingColorShader_Type) )
/*---------------------------Python BPy_IncreasingColorShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h
index ae4f37835cc..33d883b1860 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject IncreasingThicknessShader_Type;
-#define BPy_IncreasingThicknessShader_Check(v) (( (PyObject *) v)->ob_type == &IncreasingThicknessShader_Type)
+#define BPy_IncreasingThicknessShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &IncreasingThicknessShader_Type) )
/*---------------------------Python BPy_IncreasingThicknessShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h
index 7cc2e94e2cc..85bcc00e869 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject PolygonalizationShader_Type;
-#define BPy_PolygonalizationShader_Check(v) (( (PyObject *) v)->ob_type == &PolygonalizationShader_Type)
+#define BPy_PolygonalizationShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &PolygonalizationShader_Type) )
/*---------------------------Python BPy_PolygonalizationShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h
index 763bee23168..dfc6efb3319 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject SamplingShader_Type;
-#define BPy_SamplingShader_Check(v) (( (PyObject *) v)->ob_type == &SamplingShader_Type)
+#define BPy_SamplingShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &SamplingShader_Type) )
/*---------------------------Python BPy_SamplingShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h
index ac232502881..46e1c12385d 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject SpatialNoiseShader_Type;
-#define BPy_SpatialNoiseShader_Check(v) (( (PyObject *) v)->ob_type == &SpatialNoiseShader_Type)
+#define BPy_SpatialNoiseShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &SpatialNoiseShader_Type) )
/*---------------------------Python BPy_SpatialNoiseShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h
index d60ba3080ab..c65506f2f14 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject StrokeTextureShader_Type;
-#define BPy_StrokeTextureShader_Check(v) (( (PyObject *) v)->ob_type == &StrokeTextureShader_Type)
+#define BPy_StrokeTextureShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &StrokeTextureShader_Type) )
/*---------------------------Python BPy_StrokeTextureShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h
index 658f3f4ec8d..9cffc1c1662 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject TextureAssignerShader_Type;
-#define BPy_TextureAssignerShader_Check(v) (( (PyObject *) v)->ob_type == &TextureAssignerShader_Type)
+#define BPy_TextureAssignerShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TextureAssignerShader_Type) )
/*---------------------------Python BPy_TextureAssignerShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h
index 8a0437715f4..c3ef101683e 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ThicknessNoiseShader_Type;
-#define BPy_ThicknessNoiseShader_Check(v) (( (PyObject *) v)->ob_type == &ThicknessNoiseShader_Type)
+#define BPy_ThicknessNoiseShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ThicknessNoiseShader_Type) )
/*---------------------------Python BPy_ThicknessNoiseShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h
index 4c850bdb50f..302c9e005ae 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ThicknessVariationPatternShader_Type;
-#define BPy_ThicknessVariationPatternShader_Check(v) (( (PyObject *) v)->ob_type == &ThicknessVariationPatternShader_Type)
+#define BPy_ThicknessVariationPatternShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ThicknessVariationPatternShader_Type) )
/*---------------------------Python BPy_ThicknessVariationPatternShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h
index 1ca4594d8d5..a1b2e3988bc 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject TipRemoverShader_Type;
-#define BPy_TipRemoverShader_Check(v) (( (PyObject *) v)->ob_type == &TipRemoverShader_Type)
+#define BPy_TipRemoverShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TipRemoverShader_Type) )
/*---------------------------Python BPy_TipRemoverShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h
index 02cf0daff18..843d50505db 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject fstreamShader_Type;
-#define BPy_fstreamShader_Check(v) (( (PyObject *) v)->ob_type == &fstreamShader_Type)
+#define BPy_fstreamShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &fstreamShader_Type) )
/*---------------------------Python BPy_fstreamShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h
index ae34cb44798..38056d5fa59 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject streamShader_Type;
-#define BPy_streamShader_Check(v) (( (PyObject *) v)->ob_type == &streamShader_Type)
+#define BPy_streamShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &streamShader_Type) )
/*---------------------------Python BPy_streamShader structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h
index 2f0cb828419..6aadc3be4ac 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject UnaryFunction0DDouble_Type;
-#define BPy_UnaryFunction0DDouble_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DDouble_Type)
+#define BPy_UnaryFunction0DDouble_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DDouble_Type) )
/*---------------------------Python BPy_UnaryFunction0DDouble structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h
index 2aacd343ab1..30e16835482 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h
@@ -15,7 +15,7 @@ extern "C" {
extern PyTypeObject UnaryFunction0DEdgeNature_Type;
-#define BPy_UnaryFunction0DEdgeNature_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DEdgeNature_Type)
+#define BPy_UnaryFunction0DEdgeNature_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DEdgeNature_Type) )
/*---------------------------Python BPy_UnaryFunction0DEdgeNature structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h
index 46183228af6..7662a118a09 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject UnaryFunction0DFloat_Type;
-#define BPy_UnaryFunction0DFloat_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DFloat_Type)
+#define BPy_UnaryFunction0DFloat_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DFloat_Type) )
/*---------------------------Python BPy_UnaryFunction0DFloat structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h
index b1b87058bc8..ee15c63d8f0 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h
@@ -15,7 +15,7 @@ extern "C" {
extern PyTypeObject UnaryFunction0DId_Type;
-#define BPy_UnaryFunction0DId_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DId_Type)
+#define BPy_UnaryFunction0DId_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DId_Type) )
/*---------------------------Python BPy_UnaryFunction0DId structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h
index d8baa3d98f4..5e932213128 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h
@@ -15,7 +15,7 @@ extern "C" {
extern PyTypeObject UnaryFunction0DMaterial_Type;
-#define BPy_UnaryFunction0DMaterial_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DMaterial_Type)
+#define BPy_UnaryFunction0DMaterial_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DMaterial_Type) )
/*---------------------------Python BPy_UnaryFunction0DMaterial structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h
index f79739b7a34..e6b7351ae07 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject UnaryFunction0DUnsigned_Type;
-#define BPy_UnaryFunction0DUnsigned_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DUnsigned_Type)
+#define BPy_UnaryFunction0DUnsigned_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DUnsigned_Type) )
/*---------------------------Python BPy_UnaryFunction0DUnsigned structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h
index a52edd1461a..82c9845e08b 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject UnaryFunction0DVec2f_Type;
-#define BPy_UnaryFunction0DVec2f_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DVec2f_Type)
+#define BPy_UnaryFunction0DVec2f_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DVec2f_Type) )
/*---------------------------Python BPy_UnaryFunction0DVec2f structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h
index b0e598c05cd..7bd2b81dad6 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject UnaryFunction0DVec3f_Type;
-#define BPy_UnaryFunction0DVec3f_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DVec3f_Type)
+#define BPy_UnaryFunction0DVec3f_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DVec3f_Type) )
/*---------------------------Python BPy_UnaryFunction0DVec3f structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h
index 88daae11b68..9d9f7b9deda 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject UnaryFunction0DVectorViewShape_Type;
-#define BPy_UnaryFunction0DVectorViewShape_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DVectorViewShape_Type)
+#define BPy_UnaryFunction0DVectorViewShape_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DVectorViewShape_Type) )
/*---------------------------Python BPy_UnaryFunction0DVectorViewShape structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h
index 01057333a3e..e0bb3989506 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h
@@ -15,7 +15,7 @@ extern "C" {
extern PyTypeObject UnaryFunction0DViewShape_Type;
-#define BPy_UnaryFunction0DViewShape_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DViewShape_Type)
+#define BPy_UnaryFunction0DViewShape_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DViewShape_Type) )
/*---------------------------Python BPy_UnaryFunction0DViewShape structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h
index 25d4bd76a1b..11995bb4e88 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ShapeIdF0D_Type;
-#define BPy_ShapeIdF0D_Check(v) (( (PyObject *) v)->ob_type == &ShapeIdF0D_Type)
+#define BPy_ShapeIdF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ShapeIdF0D_Type) )
/*---------------------------Python BPy_ShapeIdF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h
index 4a3af1b9ff6..1ae30484ba5 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject MaterialF0D_Type;
-#define BPy_MaterialF0D_Check(v) (( (PyObject *) v)->ob_type == &MaterialF0D_Type)
+#define BPy_MaterialF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &MaterialF0D_Type) )
/*---------------------------Python BPy_MaterialF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h
index 62494f3dbaa..63b3050c474 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject CurveNatureF0D_Type;
-#define BPy_CurveNatureF0D_Check(v) (( (PyObject *) v)->ob_type == &CurveNatureF0D_Type)
+#define BPy_CurveNatureF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &CurveNatureF0D_Type) )
/*---------------------------Python BPy_CurveNatureF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h
index 1482ffae5f2..0b3be2df428 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject Normal2DF0D_Type;
-#define BPy_Normal2DF0D_Check(v) (( (PyObject *) v)->ob_type == &Normal2DF0D_Type)
+#define BPy_Normal2DF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Normal2DF0D_Type) )
/*---------------------------Python BPy_Normal2DF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h
index c6ace665481..1cce9b592ba 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject VertexOrientation2DF0D_Type;
-#define BPy_VertexOrientation2DF0D_Check(v) (( (PyObject *) v)->ob_type == &VertexOrientation2DF0D_Type)
+#define BPy_VertexOrientation2DF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &VertexOrientation2DF0D_Type) )
/*---------------------------Python BPy_VertexOrientation2DF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h
index 6a916362bb7..80cac529f0b 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject VertexOrientation3DF0D_Type;
-#define BPy_VertexOrientation3DF0D_Check(v) (( (PyObject *) v)->ob_type == &VertexOrientation3DF0D_Type)
+#define BPy_VertexOrientation3DF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &VertexOrientation3DF0D_Type) )
/*---------------------------Python BPy_VertexOrientation3DF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h
index 2ba71a6637e..fd4f7d92bbb 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetOccludeeF0D_Type;
-#define BPy_GetOccludeeF0D_Check(v) (( (PyObject *) v)->ob_type == &GetOccludeeF0D_Type)
+#define BPy_GetOccludeeF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetOccludeeF0D_Type) )
/*---------------------------Python BPy_GetOccludeeF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h
index 6e97bd9a690..040c753968d 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetShapeF0D_Type;
-#define BPy_GetShapeF0D_Check(v) (( (PyObject *) v)->ob_type == &GetShapeF0D_Type)
+#define BPy_GetShapeF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetShapeF0D_Type) )
/*---------------------------Python BPy_GetShapeF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h
index 1146369320a..810ba04db8a 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject Curvature2DAngleF0D_Type;
-#define BPy_Curvature2DAngleF0D_Check(v) (( (PyObject *) v)->ob_type == &Curvature2DAngleF0D_Type)
+#define BPy_Curvature2DAngleF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Curvature2DAngleF0D_Type) )
/*---------------------------Python BPy_Curvature2DAngleF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h
index 3b113a0e636..17ea95a771c 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject DensityF0D_Type;
-#define BPy_DensityF0D_Check(v) (( (PyObject *) v)->ob_type == &DensityF0D_Type)
+#define BPy_DensityF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &DensityF0D_Type) )
/*---------------------------Python BPy_DensityF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h
index dcf6648cd6d..da73623cbf0 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetProjectedXF0D_Type;
-#define BPy_GetProjectedXF0D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedXF0D_Type)
+#define BPy_GetProjectedXF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetProjectedXF0D_Type) )
/*---------------------------Python BPy_GetProjectedXF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h
index ea7d5a5ab76..3a26e093747 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetProjectedYF0D_Type;
-#define BPy_GetProjectedYF0D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedYF0D_Type)
+#define BPy_GetProjectedYF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetProjectedYF0D_Type) )
/*---------------------------Python BPy_GetProjectedYF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h
index c3cd9cb8c19..aa41b70c660 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetProjectedZF0D_Type;
-#define BPy_GetProjectedZF0D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedZF0D_Type)
+#define BPy_GetProjectedZF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetProjectedZF0D_Type) )
/*---------------------------Python BPy_GetProjectedZF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h
index 6164a46f252..69e9a892f4a 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetXF0D_Type;
-#define BPy_GetXF0D_Check(v) (( (PyObject *) v)->ob_type == &GetXF0D_Type)
+#define BPy_GetXF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetXF0D_Type) )
/*---------------------------Python BPy_GetXF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h
index f85e2c5976a..0601f38585f 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetYF0D_Type;
-#define BPy_GetYF0D_Check(v) (( (PyObject *) v)->ob_type == &GetYF0D_Type)
+#define BPy_GetYF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetYF0D_Type) )
/*---------------------------Python BPy_GetYF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h
index c7bed2ebda8..eac52426600 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetZF0D_Type;
-#define BPy_GetZF0D_Check(v) (( (PyObject *) v)->ob_type == &GetZF0D_Type)
+#define BPy_GetZF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetZF0D_Type) )
/*---------------------------Python BPy_GetZF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h
index 6f84891fc1d..7385e1d24c1 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject LocalAverageDepthF0D_Type;
-#define BPy_LocalAverageDepthF0D_Check(v) (( (PyObject *) v)->ob_type == &LocalAverageDepthF0D_Type)
+#define BPy_LocalAverageDepthF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &LocalAverageDepthF0D_Type) )
/*---------------------------Python BPy_LocalAverageDepthF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h
index 21f854d96c9..a26ba4fdbd6 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ZDiscontinuityF0D_Type;
-#define BPy_ZDiscontinuityF0D_Check(v) (( (PyObject *) v)->ob_type == &ZDiscontinuityF0D_Type)
+#define BPy_ZDiscontinuityF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ZDiscontinuityF0D_Type) )
/*---------------------------Python BPy_ZDiscontinuityF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h
index f36371dfee5..0cb56fcec70 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetCurvilinearAbscissaF0D_Type;
-#define BPy_GetCurvilinearAbscissaF0D_Check(v) (( (PyObject *) v)->ob_type == &GetCurvilinearAbscissaF0D_Type)
+#define BPy_GetCurvilinearAbscissaF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetCurvilinearAbscissaF0D_Type) )
/*---------------------------Python BPy_GetCurvilinearAbscissaF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h
index 77a08de4b07..4817e5cec86 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetParameterF0D_Type;
-#define BPy_GetParameterF0D_Check(v) (( (PyObject *) v)->ob_type == &GetParameterF0D_Type)
+#define BPy_GetParameterF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetParameterF0D_Type) )
/*---------------------------Python BPy_GetParameterF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h
index aa626703aff..c072ba7f408 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetViewMapGradientNormF0D_Type;
-#define BPy_GetViewMapGradientNormF0D_Check(v) (( (PyObject *) v)->ob_type == &GetViewMapGradientNormF0D_Type)
+#define BPy_GetViewMapGradientNormF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetViewMapGradientNormF0D_Type) )
/*---------------------------Python BPy_GetViewMapGradientNormF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h
index 5a4d90e821d..6a10e6c06a4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ReadCompleteViewMapPixelF0D_Type;
-#define BPy_ReadCompleteViewMapPixelF0D_Check(v) (( (PyObject *) v)->ob_type == &ReadCompleteViewMapPixelF0D_Type)
+#define BPy_ReadCompleteViewMapPixelF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ReadCompleteViewMapPixelF0D_Type) )
/*---------------------------Python BPy_ReadCompleteViewMapPixelF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h
index e010bd3495a..9aed0cd82bf 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ReadMapPixelF0D_Type;
-#define BPy_ReadMapPixelF0D_Check(v) (( (PyObject *) v)->ob_type == &ReadMapPixelF0D_Type)
+#define BPy_ReadMapPixelF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ReadMapPixelF0D_Type) )
/*---------------------------Python BPy_ReadMapPixelF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h
index cc0c3a93f0e..a881a10f72d 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ReadSteerableViewMapPixelF0D_Type;
-#define BPy_ReadSteerableViewMapPixelF0D_Check(v) (( (PyObject *) v)->ob_type == &ReadSteerableViewMapPixelF0D_Type)
+#define BPy_ReadSteerableViewMapPixelF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ReadSteerableViewMapPixelF0D_Type) )
/*---------------------------Python BPy_ReadSteerableViewMapPixelF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h
index 02706b48bd5..39b73343608 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject QuantitativeInvisibilityF0D_Type;
-#define BPy_QuantitativeInvisibilityF0D_Check(v) (( (PyObject *) v)->ob_type == &QuantitativeInvisibilityF0D_Type)
+#define BPy_QuantitativeInvisibilityF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &QuantitativeInvisibilityF0D_Type) )
/*---------------------------Python BPy_QuantitativeInvisibilityF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h
index 3d4108124f0..0e92158a2e7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetOccludersF0D_Type;
-#define BPy_GetOccludersF0D_Check(v) (( (PyObject *) v)->ob_type == &GetOccludersF0D_Type)
+#define BPy_GetOccludersF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetOccludersF0D_Type) )
/*---------------------------Python BPy_GetOccludersF0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h
index 7b6e9430498..81533dc21aa 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject UnaryFunction1DDouble_Type;
-#define BPy_UnaryFunction1DDouble_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DDouble_Type)
+#define BPy_UnaryFunction1DDouble_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DDouble_Type) )
/*---------------------------Python BPy_UnaryFunction1DDouble structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h
index 9e899916a95..afa65511560 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h
@@ -15,7 +15,7 @@ extern "C" {
extern PyTypeObject UnaryFunction1DEdgeNature_Type;
-#define BPy_UnaryFunction1DEdgeNature_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DEdgeNature_Type)
+#define BPy_UnaryFunction1DEdgeNature_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DEdgeNature_Type) )
/*---------------------------Python BPy_UnaryFunction1DEdgeNature structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h
index f454ab664ed..b144a95afe3 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject UnaryFunction1DFloat_Type;
-#define BPy_UnaryFunction1DFloat_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DFloat_Type)
+#define BPy_UnaryFunction1DFloat_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DFloat_Type) )
/*---------------------------Python BPy_UnaryFunction1DFloat structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h
index 0df50d9a999..5904f0ad267 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject UnaryFunction1DUnsigned_Type;
-#define BPy_UnaryFunction1DUnsigned_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DUnsigned_Type)
+#define BPy_UnaryFunction1DUnsigned_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DUnsigned_Type) )
/*---------------------------Python BPy_UnaryFunction1DUnsigned structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h
index 098992e6631..9d369a646a1 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject UnaryFunction1DVec2f_Type;
-#define BPy_UnaryFunction1DVec2f_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DVec2f_Type)
+#define BPy_UnaryFunction1DVec2f_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DVec2f_Type) )
/*---------------------------Python BPy_UnaryFunction1DVec2f structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h
index 3829fa12b62..a79b173f0a9 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject UnaryFunction1DVec3f_Type;
-#define BPy_UnaryFunction1DVec3f_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DVec3f_Type)
+#define BPy_UnaryFunction1DVec3f_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DVec3f_Type) )
/*---------------------------Python BPy_UnaryFunction1DVec3f structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h
index cdde1926c86..492129c2b9a 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h
@@ -16,7 +16,7 @@ extern "C" {
extern PyTypeObject UnaryFunction1DVectorViewShape_Type;
-#define BPy_UnaryFunction1DVectorViewShape_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DVectorViewShape_Type)
+#define BPy_UnaryFunction1DVectorViewShape_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DVectorViewShape_Type) )
/*---------------------------Python BPy_UnaryFunction1DVectorViewShape structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h
index 68d9c61569c..3e8ad431ec4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject UnaryFunction1DVoid_Type;
-#define BPy_UnaryFunction1DVoid_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DVoid_Type)
+#define BPy_UnaryFunction1DVoid_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DVoid_Type) )
/*---------------------------Python BPy_UnaryFunction1DVoid structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h
index 7e9344dddda..852f8937954 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject CurveNatureF1D_Type;
-#define BPy_CurveNatureF1D_Check(v) (( (PyObject *) v)->ob_type == &CurveNatureF1D_Type)
+#define BPy_CurveNatureF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &CurveNatureF1D_Type) )
/*---------------------------Python BPy_CurveNatureF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h
index 70bfb0adb12..32078558d0c 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject Normal2DF1D_Type;
-#define BPy_Normal2DF1D_Check(v) (( (PyObject *) v)->ob_type == &Normal2DF1D_Type)
+#define BPy_Normal2DF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Normal2DF1D_Type) )
/*---------------------------Python BPy_Normal2DF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h
index bcae5fc220f..189ab04db4f 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject Orientation2DF1D_Type;
-#define BPy_Orientation2DF1D_Check(v) (( (PyObject *) v)->ob_type == &Orientation2DF1D_Type)
+#define BPy_Orientation2DF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Orientation2DF1D_Type) )
/*---------------------------Python BPy_Orientation2DF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h
index a868c04ce15..b69baf106f4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject Orientation3DF1D_Type;
-#define BPy_Orientation3DF1D_Check(v) (( (PyObject *) v)->ob_type == &Orientation3DF1D_Type)
+#define BPy_Orientation3DF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Orientation3DF1D_Type) )
/*---------------------------Python BPy_Orientation3DF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h
index 838bb229844..1603a7dc4ea 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject Curvature2DAngleF1D_Type;
-#define BPy_Curvature2DAngleF1D_Check(v) (( (PyObject *) v)->ob_type == &Curvature2DAngleF1D_Type)
+#define BPy_Curvature2DAngleF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Curvature2DAngleF1D_Type) )
/*---------------------------Python BPy_Curvature2DAngleF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h
index c7839b86d4d..36426536b36 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject DensityF1D_Type;
-#define BPy_DensityF1D_Check(v) (( (PyObject *) v)->ob_type == &DensityF1D_Type)
+#define BPy_DensityF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &DensityF1D_Type) )
/*---------------------------Python BPy_DensityF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h
index 5106930be75..5963b820348 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetCompleteViewMapDensityF1D_Type;
-#define BPy_GetCompleteViewMapDensityF1D_Check(v) (( (PyObject *) v)->ob_type == &GetCompleteViewMapDensityF1D_Type)
+#define BPy_GetCompleteViewMapDensityF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetCompleteViewMapDensityF1D_Type) )
/*---------------------------Python BPy_GetCompleteViewMapDensityF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h
index a2c3572694f..0e2d7ec2718 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetDirectionalViewMapDensityF1D_Type;
-#define BPy_GetDirectionalViewMapDensityF1D_Check(v) (( (PyObject *) v)->ob_type == &GetDirectionalViewMapDensityF1D_Type)
+#define BPy_GetDirectionalViewMapDensityF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetDirectionalViewMapDensityF1D_Type) )
/*---------------------------Python BPy_GetDirectionalViewMapDensityF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h
index 26350df2013..d799fb7b334 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetProjectedXF1D_Type;
-#define BPy_GetProjectedXF1D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedXF1D_Type)
+#define BPy_GetProjectedXF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetProjectedXF1D_Type) )
/*---------------------------Python BPy_GetProjectedXF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h
index 86602d9619c..1b7fe6c6b5f 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetProjectedYF1D_Type;
-#define BPy_GetProjectedYF1D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedYF1D_Type)
+#define BPy_GetProjectedYF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetProjectedYF1D_Type) )
/*---------------------------Python BPy_GetProjectedYF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h
index 9f2a4bc1a3e..a87ac6f8c5e 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetProjectedZF1D_Type;
-#define BPy_GetProjectedZF1D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedZF1D_Type)
+#define BPy_GetProjectedZF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetProjectedZF1D_Type) )
/*---------------------------Python BPy_GetProjectedZF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h
index fa9942a55a1..29880c7e9a7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h
@@ -13,8 +13,7 @@ extern "C" {
extern PyTypeObject GetSteerableViewMapDensityF1D_Type;
-#define BPy_GetSteerableViewMapDensityF1D_Check(v) (( (PyObject *) v)->ob_type == &GetSteerableViewMapDensityF1D_Type)
-
+#define BPy_GetSteerableViewMapDensityF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetSteerableViewMapDensityF1D_Type) )
/*---------------------------Python BPy_GetSteerableViewMapDensityF1D structure definition----------*/
typedef struct {
BPy_UnaryFunction1DDouble py_uf1D_double;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h
index 5fcb88d5a29..4f07629870f 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetViewMapGradientNormF1D_Type;
-#define BPy_GetViewMapGradientNormF1D_Check(v) (( (PyObject *) v)->ob_type == &GetViewMapGradientNormF1D_Type)
+#define BPy_GetViewMapGradientNormF1D_Check(v) ( ((PyObject *) v)->ob_type == PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetViewMapGradientNormF1D_Type) )
/*---------------------------Python BPy_GetViewMapGradientNormF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h
index ad39a5a9b10..5eae107daae 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetXF1D_Type;
-#define BPy_GetXF1D_Check(v) (( (PyObject *) v)->ob_type == &GetXF1D_Type)
+#define BPy_GetXF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetXF1D_Type) )
/*---------------------------Python BPy_GetXF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h
index 6fc7da72752..5864c245776 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetYF1D_Type;
-#define BPy_GetYF1D_Check(v) (( (PyObject *) v)->ob_type == &GetYF1D_Type)
+#define BPy_GetYF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetYF1D_Type) )
/*---------------------------Python BPy_GetYF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h
index 71e57faa7ef..4b91a567eef 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetZF1D_Type;
-#define BPy_GetZF1D_Check(v) (( (PyObject *) v)->ob_type == &GetZF1D_Type)
+#define BPy_GetZF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetZF1D_Type) )
/*---------------------------Python BPy_GetZF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h
index cb9902cc38f..627d10b6414 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject LocalAverageDepthF1D_Type;
-#define BPy_LocalAverageDepthF1D_Check(v) (( (PyObject *) v)->ob_type == &LocalAverageDepthF1D_Type)
+#define BPy_LocalAverageDepthF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &LocalAverageDepthF1D_Type) )
/*---------------------------Python BPy_LocalAverageDepthF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h
index 66524e5c16a..e6b4be556d7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ZDiscontinuityF1D_Type;
-#define BPy_ZDiscontinuityF1D_Check(v) (( (PyObject *) v)->ob_type == &ZDiscontinuityF1D_Type)
+#define BPy_ZDiscontinuityF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ZDiscontinuityF1D_Type) )
/*---------------------------Python BPy_ZDiscontinuityF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h
index 8b8e793582f..5bcf5fcc0a2 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject QuantitativeInvisibilityF1D_Type;
-#define BPy_QuantitativeInvisibilityF1D_Check(v) (( (PyObject *) v)->ob_type == &QuantitativeInvisibilityF1D_Type)
+#define BPy_QuantitativeInvisibilityF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &QuantitativeInvisibilityF1D_Type) )
/*---------------------------Python BPy_QuantitativeInvisibilityF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h
index 0377214cb70..c8d5e99a6a7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetOccludeeF1D_Type;
-#define BPy_GetOccludeeF1D_Check(v) (( (PyObject *) v)->ob_type == &GetOccludeeF1D_Type)
+#define BPy_GetOccludeeF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetOccludeeF1D_Type) )
/*---------------------------Python BPy_GetOccludeeF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h
index 76031c5a811..ad39ad25c3d 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetOccludersF1D_Type;
-#define BPy_GetOccludersF1D_Check(v) (( (PyObject *) v)->ob_type == &GetOccludersF1D_Type)
+#define BPy_GetOccludersF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetOccludersF1D_Type) )
/*---------------------------Python BPy_GetOccludersF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h
index 3505e6688b0..39d1268c03f 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject GetShapeF1D_Type;
-#define BPy_GetShapeF1D_Check(v) (( (PyObject *) v)->ob_type == &GetShapeF1D_Type)
+#define BPy_GetShapeF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetShapeF1D_Type) )
/*---------------------------Python BPy_GetShapeF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h
index e52e037e986..6855ddaf14b 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ChainingTimeStampF1D_Type;
-#define BPy_ChainingTimeStampF1D_Check(v) (( (PyObject *) v)->ob_type == &ChainingTimeStampF1D_Type)
+#define BPy_ChainingTimeStampF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ChainingTimeStampF1D_Type) )
/*---------------------------Python BPy_ChainingTimeStampF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h
index 82236dd0b79..a1d5714ab63 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject IncrementChainingTimeStampF1D_Type;
-#define BPy_IncrementChainingTimeStampF1D_Check(v) (( (PyObject *) v)->ob_type == &IncrementChainingTimeStampF1D_Type)
+#define BPy_IncrementChainingTimeStampF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &IncrementChainingTimeStampF1D_Type) )
/*---------------------------Python BPy_IncrementChainingTimeStampF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h
index f1f91d2cd6e..d9bee247c09 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject TimeStampF1D_Type;
-#define BPy_TimeStampF1D_Check(v) (( (PyObject *) v)->ob_type == &TimeStampF1D_Type)
+#define BPy_TimeStampF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TimeStampF1D_Type) )
/*---------------------------Python BPy_TimeStampF1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h
index 1cc043791c3..399941d442d 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h
+++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject FalseUP0D_Type;
-#define BPy_FalseUP0D_Check(v) (( (PyObject *) v)->ob_type == &FalseUP0D_Type)
+#define BPy_FalseUP0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FalseUP0D_Type) )
/*---------------------------Python BPy_FalseUP0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h
index a05bff86a90..24976aaa5c9 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h
+++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject TrueUP0D_Type;
-#define BPy_TrueUP0D_Check(v) (( (PyObject *) v)->ob_type == &TrueUP0D_Type)
+#define BPy_TrueUP0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TrueUP0D_Type) )
/*---------------------------Python BPy_TrueUP0D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h
index 30d71a0cd2c..a24261a60de 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ContourUP1D_Type;
-#define BPy_ContourUP1D_Check(v) (( (PyObject *) v)->ob_type == &ContourUP1D_Type)
+#define BPy_ContourUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ContourUP1D_Type) )
/*---------------------------Python BPy_ContourUP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h
index a6e6fdcd81f..2862b060a0a 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject DensityLowerThanUP1D_Type;
-#define BPy_DensityLowerThanUP1D_Check(v) (( (PyObject *) v)->ob_type == &DensityLowerThanUP1D_Type)
+#define BPy_DensityLowerThanUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &DensityLowerThanUP1D_Type) )
/*---------------------------Python BPy_DensityLowerThanUP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h
index fa8d67d0ec6..39423423b8e 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject EqualToChainingTimeStampUP1D_Type;
-#define BPy_EqualToChainingTimeStampUP1D_Check(v) (( (PyObject *) v)->ob_type == &EqualToChainingTimeStampUP1D_Type)
+#define BPy_EqualToChainingTimeStampUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &EqualToChainingTimeStampUP1D_Type) )
/*---------------------------Python BPy_EqualToChainingTimeStampUP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h
index 6de9927d7ad..538dc400dc2 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject EqualToTimeStampUP1D_Type;
-#define BPy_EqualToTimeStampUP1D_Check(v) (( (PyObject *) v)->ob_type == &EqualToTimeStampUP1D_Type)
+#define BPy_EqualToTimeStampUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &EqualToTimeStampUP1D_Type) )
/*---------------------------Python BPy_EqualToTimeStampUP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h
index 0d35f05bc7b..31300f04dfe 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ExternalContourUP1D_Type;
-#define BPy_ExternalContourUP1D_Check(v) (( (PyObject *) v)->ob_type == &ExternalContourUP1D_Type)
+#define BPy_ExternalContourUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ExternalContourUP1D_Type) )
/*---------------------------Python BPy_ExternalContourUP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h
index c406a926526..273e4962db9 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject FalseUP1D_Type;
-#define BPy_FalseUP1D_Check(v) (( (PyObject *) v)->ob_type == &FalseUP1D_Type)
+#define BPy_FalseUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FalseUP1D_Type) )
/*---------------------------Python BPy_FalseUP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h
index 676bfc00715..f120ecb9778 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject QuantitativeInvisibilityUP1D_Type;
-#define BPy_QuantitativeInvisibilityUP1D_Check(v) (( (PyObject *) v)->ob_type == &QuantitativeInvisibilityUP1D_Type)
+#define BPy_QuantitativeInvisibilityUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &QuantitativeInvisibilityUP1D_Type) )
/*---------------------------Python BPy_QuantitativeInvisibilityUP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h
index 0da88d959bc..ce6d0276edd 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject ShapeUP1D_Type;
-#define BPy_ShapeUP1D_Check(v) (( (PyObject *) v)->ob_type == &ShapeUP1D_Type)
+#define BPy_ShapeUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ShapeUP1D_Type) )
/*---------------------------Python BPy_ShapeUP1D structure definition----------*/
typedef struct {
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h
index b30b7232076..5a01ad42d2a 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h
@@ -13,7 +13,7 @@ extern "C" {
extern PyTypeObject TrueUP1D_Type;
-#define BPy_TrueUP1D_Check(v) (( (PyObject *) v)->ob_type == &TrueUP1D_Type)
+#define BPy_TrueUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TrueUP1D_Type) )
/*---------------------------Python BPy_TrueUP1D structure definition----------*/
typedef struct {