diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-20 01:11:45 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-20 01:11:45 +0400 |
commit | dbd0c3711971faa89c01bb5504bc0d76ccdeec1b (patch) | |
tree | c67352b9065500e08f516ef902a8cbddb57df721 /release/scripts/freestyle | |
parent | 21dc9660d93f10b271b0d75425484aec588706c2 (diff) |
Removed a global variable from PredicatesU1D.pyNFirstUP1D.
Suggested by Sergey Sharybin through a code review of the branch.
Diffstat (limited to 'release/scripts/freestyle')
-rw-r--r-- | release/scripts/freestyle/style_modules/PredicatesU1D.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/release/scripts/freestyle/style_modules/PredicatesU1D.py b/release/scripts/freestyle/style_modules/PredicatesU1D.py index 735c8ffdf88..c86ad107b4d 100644 --- a/release/scripts/freestyle/style_modules/PredicatesU1D.py +++ b/release/scripts/freestyle/style_modules/PredicatesU1D.py @@ -21,15 +21,14 @@ from Freestyle import Curvature2DAngleF0D, CurveNatureF1D, DensityF1D, GetComple 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 |