[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55427] branches/soc-2008-mxcurioni/ release/scripts/freestyle/style_modules/PredicatesU1D.py: Removed a global variable from PredicatesU1D.pyNFirstUP1D.
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Tue Mar 19 22:11:45 CET 2013
Revision: 55427
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55427
Author: kjym3
Date: 2013-03-19 21:11:45 +0000 (Tue, 19 Mar 2013)
Log Message:
-----------
Removed a global variable from PredicatesU1D.pyNFirstUP1D.
Suggested by Sergey Sharybin through a code review of the branch.
Modified Paths:
--------------
branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/PredicatesU1D.py
Modified: branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/PredicatesU1D.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/PredicatesU1D.py 2013-03-19 20:37:25 UTC (rev 55426)
+++ branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/PredicatesU1D.py 2013-03-19 21:11:45 UTC (rev 55427)
@@ -21,15 +21,14 @@
IntegrationType, ShapeUP1D, TVertex, UnaryPredicate1D
from Functions1D import pyDensityAnisotropyF1D, pyViewMapGradientNormF1D
-count = 0
class pyNFirstUP1D(UnaryPredicate1D):
def __init__(self, n):
UnaryPredicate1D.__init__(self)
self.__n = n
+ self.__count = 0
def __call__(self, inter):
- global count
- count = count + 1
- if count <= self.__n:
+ self.__count = self.__count + 1
+ if self.__count <= self.__n:
return 1
return 0
More information about the Bf-blender-cvs
mailing list