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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-04-04 00:03:09 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-04-04 00:03:09 +0400
commitacfd7c82abdc26b7cd2859e762f12cc066a4ef68 (patch)
tree41c8ea9b40a662db1cc86bc167feec4ea563ea2b /source/blender/freestyle/intern/python/StrokeShader
parent5926ad2db281aeb965d382533973393f0459315b (diff)
Relaxed type checking concerning boolean arguments in class constructors
and __call__ methods so that not only True and False but also various other boolean expressions (e.g., 0, 1, and None) are accepted.
Diffstat (limited to 'source/blender/freestyle/intern/python/StrokeShader')
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp2
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
index e61179eb901..1d22be137e3 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
@@ -105,7 +105,7 @@ int CalligraphicShader___init__( BPy_CalligraphicShader* self, PyObject *args)
PyObject *obj3 = 0, *obj4 = 0;
- if(!( PyArg_ParseTuple(args, "ddO!O!", &d1, &d2, &PyList_Type, &obj3, &PyBool_Type, &obj4) ))
+ if(!( PyArg_ParseTuple(args, "ddO!O", &d1, &d2, &PyList_Type, &obj3, &obj4) ))
return -1;
if( PyList_Size(obj3) != 2 ) {
stringstream msg("CalligraphicShader() accepts a list of 2 elements (");
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
index e938714f559..c226901895b 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
@@ -106,7 +106,7 @@ int SpatialNoiseShader___init__( BPy_SpatialNoiseShader* self, PyObject *args)
PyObject *obj4 = 0, *obj5 = 0;
- if(!( PyArg_ParseTuple(args, "ffiO!O!", &f1, &f2, &i3, &PyBool_Type, &obj4, &PyBool_Type, &obj5) )) {
+ if(!( PyArg_ParseTuple(args, "ffiOO", &f1, &f2, &i3, &obj4, &obj5) )) {
cout << "ERROR: SpatialNoiseShader___init__" << endl;
return -1;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp
index 6fe43bb7c4b..2223410087a 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp
@@ -105,7 +105,7 @@ int StrokeTextureShader___init__( BPy_StrokeTextureShader* self, PyObject *args)
const char *s1;
PyObject *obj2 = 0, *obj3 = 0;
- if(!( PyArg_ParseTuple(args, "s|O!O!", &s1, &MediumType_Type, &obj2, &PyBool_Type, &obj3) )) {
+ if(!( PyArg_ParseTuple(args, "s|O!O", &s1, &MediumType_Type, &obj2, &obj3) )) {
cout << "ERROR: StrokeTextureShader___init__" << endl;
return -1;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp
index 1a399b72128..66a3fa01a3f 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp
@@ -105,7 +105,7 @@ int ThicknessVariationPatternShader___init__( BPy_ThicknessVariationPatternShade
float f2 = 1.0, f3 = 5.0;
PyObject *obj4 = 0;
- if(!( PyArg_ParseTuple(args, "s|ffO!", &s1, &f2, &f3, &PyBool_Type, &obj4) )) {
+ if(!( PyArg_ParseTuple(args, "s|ffO", &s1, &f2, &f3, &obj4) )) {
cout << "ERROR: ThicknessVariationPatternShader___init__" << endl;
return -1;
}