[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21946] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/python: * Fixed compiler errors in UnaryFunction0DVectorViewShape::__call__()
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Mon Jul 27 21:34:54 CEST 2009
Revision: 21946
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21946
Author: kjym3
Date: 2009-07-27 21:34:52 +0200 (Mon, 27 Jul 2009)
Log Message:
-----------
* Fixed compiler errors in UnaryFunction0DVectorViewShape::__call__()
and UnaryFunction1DVectorViewShape::__call__().
* Added a Python wrapper of ViewEdge::qi().
Modified Paths:
--------------
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp 2009-07-27 19:33:06 UTC (rev 21945)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp 2009-07-27 19:34:52 UTC (rev 21946)
@@ -40,6 +40,7 @@
static PyObject * ViewEdge_verticesEnd( BPy_ViewEdge *self );
static PyObject * ViewEdge_pointsBegin( BPy_ViewEdge *self, PyObject *args );
static PyObject * ViewEdge_pointsEnd( BPy_ViewEdge *self, PyObject *args );
+static PyObject * ViewEdge_qi( BPy_ViewEdge *self );
/*----------------------ViewEdge instance definitions ----------------------------*/
@@ -67,6 +68,7 @@
{"verticesEnd", ( PyCFunction ) ViewEdge_verticesEnd, METH_NOARGS, "() Returns an Interface0DIterator to iterate over the SVertex constituing the embedding of this ViewEdge. The returned Interface0DIterator points after the last SVertex of the ViewEdge."},
{"pointsBegin", ( PyCFunction ) ViewEdge_pointsBegin, METH_VARARGS, "(float t=0) Returns an Interface0DIterator to iterate over the points of this ViewEdge at a given resolution t. The returned Interface0DIterator points on the first Point of the ViewEdge."},
{"pointsEnd", ( PyCFunction ) ViewEdge_pointsEnd, METH_VARARGS, "(float t=0) Returns an Interface0DIterator to iterate over the points of this ViewEdge at a given resolution t. The returned Interface0DIterator points after the last Point of the ViewEdge."},
+ {"qi", ( PyCFunction ) ViewEdge_qi, METH_NOARGS, "() Returns the quantitative invisibility of the ViewEdge."},
{NULL, NULL, 0, NULL}
};
@@ -372,6 +374,10 @@
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it );
}
+PyObject * ViewEdge_qi( BPy_ViewEdge *self ) {
+ return PyInt_FromLong( self->ve->qi() );
+}
+
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp 2009-07-27 19:33:06 UTC (rev 21945)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp 2009-07-27 19:34:52 UTC (rev 21946)
@@ -167,7 +167,7 @@
if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
return NULL;
- if( typeid(*(self->uf0D_vectorviewshape)) == typeid(UnaryFunction0D<std::vector<ViewShape*>>) ) {
+ if( typeid(*(self->uf0D_vectorviewshape)) == typeid(UnaryFunction0D< std::vector<ViewShape*> >) ) {
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
return NULL;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp 2009-07-27 19:33:06 UTC (rev 21945)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp 2009-07-27 19:34:52 UTC (rev 21946)
@@ -198,7 +198,7 @@
if( !PyArg_ParseTuple(args, "O!", &Interface1D_Type, &obj) )
return NULL;
- if( typeid(*(self->uf1D_vectorviewshape)) == typeid(UnaryFunction1D<std::vector<ViewShape*>>) ) {
+ if( typeid(*(self->uf1D_vectorviewshape)) == typeid(UnaryFunction1D< std::vector<ViewShape*> >) ) {
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
return NULL;
}
More information about the Bf-blender-cvs
mailing list