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