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:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-07-29 09:45:16 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-07-29 09:45:16 +0400
commitdb6388e0f2b1e03ff280615fb96b93c565c9b22a (patch)
tree3a538b4464fb6b9d6bef5df129027970f37f08c8 /source/blender/freestyle/intern/python/StrokeShader
parente4677c409dcad94e96b2ae765422f91e0b0dd9fd (diff)
soc-2008-mxcurioni: finished porting the Freestyle API. All of the original classes, except EdgeModifier and TimestampModifier (which aren't even ported via SWIG), are available under the Blender.Freestyle module. Testing of the porting will now begin to make sure the SWIG-less system works as the original.
Quite a few modifications were made to finish the API: - Freestyle's SConscript was modified to catch all files within the intern/python directory, allowing integration of future shaders implemented in C++. - the Operators class was ported, with a special care of making its methods static (using the METH_STATIC flag in the tp_methods method definitions) - all of the type-checking functions [ BPy_[class name]_Check(obj) ] were changed to allow subclasses to be seen as that type too: instead on looking at the ob_type value, the PyObject_IsInstance function is used. - all of the iterators can now retrieve the object pointed to by the operator, using the getObject() method. A directedViewEdge pair is returned as a list of the two elements in the pair. - all of the style modules were copied to a style_modules_blender/ folder and were modified to use Freestyle as a Blender's submodule. IntegrationType and MediumType was also integrated (for example, changing MEAN to IntegrationType.MEAN). Testing now begins. If everything works correctly, I'll move on to lib3ds removal right away.
Diffstat (limited to 'source/blender/freestyle/intern/python/StrokeShader')
-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
21 files changed, 21 insertions, 21 deletions
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 {