[Bf-blender-cvs] [a86d8bc] master: Revised freestyle.predicates.pyZBP1D so that the constructor accepts an integration type.

Tamito Kajiyama noreply at git.blender.org
Thu Apr 17 18:33:38 CEST 2014


Commit: a86d8bceb50b99630a14fa03b39977e6eec20b1c
Author: Tamito Kajiyama
Date:   Fri Apr 18 01:24:11 2014 +0900
https://developer.blender.org/rBa86d8bceb50b99630a14fa03b39977e6eec20b1c

Revised freestyle.predicates.pyZBP1D so that the constructor accepts an integration type.

===================================================================

M	release/scripts/freestyle/modules/freestyle/predicates.py

===================================================================

diff --git a/release/scripts/freestyle/modules/freestyle/predicates.py b/release/scripts/freestyle/modules/freestyle/predicates.py
index 0801795..0bcba16 100644
--- a/release/scripts/freestyle/modules/freestyle/predicates.py
+++ b/release/scripts/freestyle/modules/freestyle/predicates.py
@@ -517,9 +517,12 @@ class pyClosedCurveUP1D(UnaryPredicate1D):
 
 
 class pyZBP1D(BinaryPredicate1D):
+    def __init__(self, iType=IntegrationType.MEAN):
+        BinaryPredicate1D.__init__(self)
+        self._GetZ = GetZF1D(iType)
+
     def __call__(self, i1, i2):
-        func = GetZF1D()
-        return (func(i1) > func(i2))
+        return (self._GetZ(i1) > self._GetZ(i2))
 
 
 class pyZDiscontinuityBP1D(BinaryPredicate1D):




More information about the Bf-blender-cvs mailing list