[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19289] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/python: Fixed incorrect argument checking.
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Sat Mar 14 14:27:41 CET 2009
Revision: 19289
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19289
Author: kjym3
Date: 2009-03-14 14:27:41 +0100 (Sat, 14 Mar 2009)
Log Message:
-----------
Fixed incorrect argument checking.
Modified Paths:
--------------
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp 2009-03-14 13:23:35 UTC (rev 19288)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp 2009-03-14 13:27:41 UTC (rev 19289)
@@ -108,12 +108,12 @@
PyObject *obj;
float f = 2.0;
- if(!( PyArg_ParseTuple(args, "i|Of", &i, &obj) )) {
+ if(!( PyArg_ParseTuple(args, "i|O!f", &i, &IntegrationType_Type, &obj, &f) )) {
cout << "ERROR: ViewMapGradientNormBP1D___init__" << endl;
return -1;
}
- IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
+ IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
self->py_bp1D.bp1D = new Predicates1D::ViewMapGradientNormBP1D(i,t,f);
return 0;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp 2009-03-14 13:23:35 UTC (rev 19288)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp 2009-03-14 13:27:41 UTC (rev 19289)
@@ -217,7 +217,7 @@
{
PyObject *obj;
- if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) {
+ if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj)) {
cout << "ERROR: UnaryFunction0DDouble___call__ " << endl;
return NULL;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp 2009-03-14 13:23:35 UTC (rev 19288)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp 2009-03-14 13:27:41 UTC (rev 19289)
@@ -160,7 +160,7 @@
{
PyObject *obj;
- if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) {
+ if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj)) {
cout << "ERROR: UnaryFunction0DEdgeNature___call__ " << endl;
return NULL;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp 2009-03-14 13:23:35 UTC (rev 19288)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp 2009-03-14 13:27:41 UTC (rev 19289)
@@ -189,7 +189,7 @@
{
PyObject *obj;
- if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) {
+ if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj)) {
cout << "ERROR: UnaryFunction0DFloat___call__ " << endl;
return NULL;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp 2009-03-14 13:23:35 UTC (rev 19288)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp 2009-03-14 13:27:41 UTC (rev 19289)
@@ -160,7 +160,7 @@
{
PyObject *obj;
- if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) {
+ if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj)) {
cout << "ERROR: UnaryFunction0DId___call__ " << endl;
return NULL;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp 2009-03-14 13:23:35 UTC (rev 19288)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp 2009-03-14 13:27:41 UTC (rev 19289)
@@ -160,7 +160,7 @@
{
PyObject *obj;
- if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) {
+ if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj)) {
cout << "ERROR: UnaryFunction0DMaterial___call__ " << endl;
return NULL;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp 2009-03-14 13:23:35 UTC (rev 19288)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp 2009-03-14 13:27:41 UTC (rev 19289)
@@ -160,7 +160,7 @@
{
PyObject *obj;
- if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) {
+ if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj)) {
cout << "ERROR: UnaryFunction0DUnsigned___call__ " << endl;
return NULL;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp 2009-03-14 13:23:35 UTC (rev 19288)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp 2009-03-14 13:27:41 UTC (rev 19289)
@@ -165,8 +165,7 @@
PyObject * UnaryFunction0DVec2f___call__( BPy_UnaryFunction0DVec2f *self, PyObject *args)
{
PyObject *obj;
-
- if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) {
+ if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj)) {
cout << "ERROR: UnaryFunction0DVec2f___call__ " << endl;
return NULL;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp 2009-03-14 13:23:35 UTC (rev 19288)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp 2009-03-14 13:27:41 UTC (rev 19289)
@@ -160,7 +160,7 @@
{
PyObject *obj;
- if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) {
+ if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj)) {
cout << "ERROR: UnaryFunction0DVec3f___call__ " << endl;
return NULL;
}
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-03-14 13:23:35 UTC (rev 19288)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp 2009-03-14 13:27:41 UTC (rev 19289)
@@ -160,7 +160,7 @@
{
PyObject *obj;
- if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) {
+ if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj)) {
cout << "ERROR: UnaryFunction0DVectorViewShape___call__ " << endl;
return NULL;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp 2009-03-14 13:23:35 UTC (rev 19288)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp 2009-03-14 13:27:41 UTC (rev 19289)
@@ -166,7 +166,7 @@
{
PyObject *obj;
- if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) {
+ if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj)) {
cout << "ERROR: UnaryFunction0DViewShape___call__ " << endl;
return NULL;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp 2009-03-14 13:23:35 UTC (rev 19288)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp 2009-03-14 13:27:41 UTC (rev 19289)
@@ -220,7 +220,7 @@
{
PyObject *obj;
- if( !PyArg_ParseTuple(args, "|O", &obj) && BPy_IntegrationType_Check(obj) ) {
+ if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) {
cout << "ERROR: UnaryFunction1DDouble___init__ " << endl;
return -1;
}
@@ -257,7 +257,7 @@
{
PyObject *obj;
- if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface1D_Check(obj) ) {
+ if( !PyArg_ParseTuple(args, "O!", &Interface1D_Type, &obj) ) {
cout << "ERROR: UnaryFunction1DDouble___call__ " << endl;
return NULL;
}
@@ -271,7 +271,7 @@
{
PyObject *obj;
- if( !PyArg_ParseTuple(args, "O", &obj) && BPy_IntegrationType_Check(obj) ) {
+ if( !PyArg_ParseTuple(args, "O!", &IntegrationType_Type, &obj) ) {
cout << "ERROR: UnaryFunction1DDouble_setIntegrationType " << endl;
Py_RETURN_NONE;
}
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list