diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-08-03 02:39:21 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-08-03 02:39:21 +0400 |
commit | e2eb4d567c27b0ea58dd6c1687dcd9538b64202e (patch) | |
tree | bfacd3a92bf1754cca773d115d291d3aa29599c8 /source/blender/freestyle/intern/python/Interface0D/ViewVertex | |
parent | 74027eafcbdb4de4fea48d0fbc765553f9294078 (diff) |
Fixed the handling of constructor arguments in the following Python
types: Interface0D, SVertex, ViewVertex, StrokeVertex, NonTVertex,
and TVertex.
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface0D/ViewVertex')
-rw-r--r-- | source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp | 4 | ||||
-rw-r--r-- | source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp index 33087c53264..da055195177 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp @@ -117,13 +117,13 @@ int NonTVertex___init__(BPy_NonTVertex *self, PyObject *args, PyObject *kwds) PyObject *obj = 0; - if (! PyArg_ParseTuple(args, "|O", &obj) ) + if (! PyArg_ParseTuple(args, "|O!", &SVertex_Type, &obj) ) return -1; if( !obj ){ self->ntv = new NonTVertex(); - } else if( BPy_SVertex_Check(obj) && ((BPy_SVertex *) obj)->sv ) { + } else if( ((BPy_SVertex *) obj)->sv ) { self->ntv = new NonTVertex( ((BPy_SVertex *) obj)->sv ); } else { diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp index 8eae4600b75..1679593cdbe 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp @@ -127,6 +127,8 @@ PyTypeObject TVertex_Type = { int TVertex___init__(BPy_TVertex *self, PyObject *args, PyObject *kwds) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->tv = new TVertex(); self->py_vv.vv = self->tv; self->py_vv.py_if0D.if0D = self->tv; |