diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-08-03 19:19:51 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-08-03 19:19:51 +0400 |
commit | ff110c17f705976435ee14f2cde9c85f7334a56c (patch) | |
tree | b1748338ca9489ddef1a61ff923b46438ed937ce /source/blender/freestyle/intern/python/Interface1D/FEdge | |
parent | d4ff63fe20d912a72a7695852a204ab3f1d3dce7 (diff) |
Fixed argument checking in __init__ methods of Interface1D, Predicates,
Functions, and StrokeShader types.
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface1D/FEdge')
-rw-r--r-- | source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp | 4 | ||||
-rw-r--r-- | source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp index 7f60098a4d1..5e037064aa8 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp @@ -135,10 +135,10 @@ int FEdgeSharp___init__(BPy_FEdgeSharp *self, PyObject *args, PyObject *kwds) if( !obj1 ){ self->fes = new FEdgeSharp(); - } else if( BPy_FEdgeSharp_Check(obj1) ) { + } else if( !obj2 && BPy_FEdgeSharp_Check(obj1) ) { self->fes = new FEdgeSharp(*( ((BPy_FEdgeSharp *) obj1)->fes )); - } else if( BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { + } else if( obj2 && BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { self->fes = new FEdgeSharp( ((BPy_SVertex *) obj1)->sv, ((BPy_SVertex *) obj2)->sv ); } else { diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp index c19ef463f22..36d5b75bc25 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp @@ -127,10 +127,10 @@ int FEdgeSmooth___init__(BPy_FEdgeSmooth *self, PyObject *args, PyObject *kwds) if( !obj1 ){ self->fes = new FEdgeSmooth(); - } else if( BPy_FEdgeSmooth_Check(obj1) ) { + } else if( !obj2 && BPy_FEdgeSmooth_Check(obj1) ) { self->fes = new FEdgeSmooth(*( ((BPy_FEdgeSmooth *) obj1)->fes )); - } else if( BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { + } else if( obj2 && BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { self->fes = new FEdgeSmooth( ((BPy_SVertex *) obj1)->sv, ((BPy_SVertex *) obj2)->sv ); } else { |