diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-04-04 18:50:54 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-04-04 18:50:54 +0400 |
commit | bff81e3394637638c8af89e91293add488e90168 (patch) | |
tree | 350619b82d671d3be8b65f358de568e96fff73ee | |
parent | acfd7c82abdc26b7cd2859e762f12cc066a4ef68 (diff) |
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.
-rw-r--r-- | source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |