Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-03-20 01:11:45 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-03-20 01:11:45 +0400
commitdbd0c3711971faa89c01bb5504bc0d76ccdeec1b (patch)
treec67352b9065500e08f516ef902a8cbddb57df721 /release/scripts/freestyle
parent21dc9660d93f10b271b0d75425484aec588706c2 (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.py7
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