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/UnaryPredicate1D
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/UnaryPredicate1D')
-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
9 files changed, 9 insertions, 9 deletions
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 {