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:
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp')
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
index db27f343ebc..87d3ef4ecd0 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
@@ -181,7 +181,13 @@ PyObject * SVertex_normalsSize( BPy_SVertex *self ) {
}
PyObject * SVertex_viewvertex( BPy_SVertex *self ) {
- return BPy_ViewVertex_from_ViewVertex_ptr( self->sv->viewvertex() );
+ ViewVertex *vv = self->sv->viewvertex();
+ if (!vv)
+ Py_RETURN_NONE;
+ if (typeid(*vv) == typeid(NonTVertex))
+ return BPy_NonTVertex_from_NonTVertex_ptr( dynamic_cast<NonTVertex*>(vv) );
+ else
+ return BPy_TVertex_from_TVertex_ptr( dynamic_cast<TVertex*>(vv) );
}
PyObject *SVertex_setPoint3D( BPy_SVertex *self , PyObject *args) {