Fix for the Selection by Image Border not working properly.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 5 Feb 2012 18:42:51 +0000 (18:42 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 5 Feb 2012 18:42:51 +0000 (18:42 +0000)
Problem report by j-mation through the BA Freestyle thread.

release/scripts/freestyle/style_modules/parameter_editor.py

index 0a0e2553ac69f167fad3685186b7c901cfc27431..d099978233741cdffb56297e74d96c502d62ae9f 100644 (file)
@@ -626,7 +626,12 @@ class WithinImageBorderUP1D(UnaryPredicate1D):
     def getName(self):
         return "WithinImageBorderUP1D"
     def __call__(self, inter):
-        return self.withinBorder(inter.A()) or self.withinBorder(inter.B())
+        it = inter.verticesBegin()
+        while not it.isEnd():
+            if self.withinBorder(it.getObject()):
+                return True
+            it.increment()
+        return False
     def withinBorder(self, vert):
         x = vert.getProjectedX()
         y = vert.getProjectedY()