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