[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19537] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/python/StrokeShader/ BPy_ColorVariationPatternShader.cpp: Relaxed type checking concerning boolean arguments so that not only

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Sat Apr 4 16:50:54 CEST 2009


Revision: 19537
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19537
Author:   kjym3
Date:     2009-04-04 16:50:54 +0200 (Sat, 04 Apr 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp	2009-04-04 14:34:39 UTC (rev 19536)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp	2009-04-04 14:50:54 UTC (rev 19537)
@@ -110,7 +110,7 @@
 		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;
 





More information about the Bf-blender-cvs mailing list