From bff81e3394637638c8af89e91293add488e90168 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Sat, 4 Apr 2009 14:50:54 +0000 Subject: Relaxed type checking concerning boolean arguments so that not only True and False but also various other boolean expressions (e.g., 0, 1, and None) are accepted. --- .../intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/freestyle/intern/python') diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp index 380c760d0c0..2a4bd1f29ed 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp @@ -110,7 +110,7 @@ int ColorVariationPatternShader___init__( BPy_ColorVariationPatternShader* self, return -1; } - bool b = (obj && PyBool_Check(obj)) ? bool_from_PyBool(obj) : true; + bool b = (obj) ? bool_from_PyBool(obj) : true; self->py_ss.ss = new StrokeShaders::ColorVariationPatternShader(s,b); return 0; -- cgit v1.2.3