Commit MetaInfo

Revision39e8949944368d4237ffb21ce14cb75f6ebc0d06 (tree)
Zeit2013-04-03 17:23:29
Autorpylaf
Commiterpylaf

Log Message

fix recursive error of mapper

Ändern Zusammenfassung

Diff

diff -r 0b4240a7b1e5 -r 39e894994436 src/pylafiii/vtkext/algorithm.py
--- a/src/pylafiii/vtkext/algorithm.py Wed Apr 03 17:16:52 2013 +0900
+++ b/src/pylafiii/vtkext/algorithm.py Wed Apr 03 17:23:29 2013 +0900
@@ -84,11 +84,15 @@
8484
8585 class Scalar(Logic):
8686 vtkobj = Port()
87- range = Port()
88- def _link_vtkobj(self):
87+ @rule
88+ def range(self):
8989 if self.vtkobj:
9090 rng = self.vtkobj.GetRange()
91- self.range = pylafiii.tkext.MinMax(rng)
91+ return pylafiii.tkext.MinMax(rng)
92+# def _link_vtkobj(self):
93+# if self.vtkobj:
94+# rng = self.vtkobj.GetRange()
95+# self.range = pylafiii.tkext.MinMax(rng)
9296
9397 class OutlineFilter(vtkLogic):
9498 vtkClass = vtk.vtkOutlineFilter
diff -r 0b4240a7b1e5 -r 39e894994436 src/pylafiii/vtkext/mapper.py
--- a/src/pylafiii/vtkext/mapper.py Wed Apr 03 17:16:52 2013 +0900
+++ b/src/pylafiii/vtkext/mapper.py Wed Apr 03 17:23:29 2013 +0900
@@ -1,7 +1,7 @@
11 # coding: utf-8
22
33 import vtk
4-from pylafiii.ingredient import Logic,Port,rule,event
4+from pylafiii.ingredient import Logic,Port,rule,event,port
55 from base import vtkLogic
66
77 class PolyDataMapper(vtkLogic):
@@ -14,8 +14,9 @@
1414 self.vtkobj.SetInput(None)
1515 @event
1616 def scalarrange(self):
17- self.vtkobj.SetScalarRange(self.scalarrange)
17+ rng = port(self,'scalarrange').subject.value
18+ self.vtkobj.SetScalarRange(rng)
1819 def _link_scalarrange(self):
19- rng = self.scalarrange
20+ rng = port(self,'scalarrange').subject.value
2021 if rng:
21- self.vtkobj.SetScalarRange(self.scalarrange)
22+ self.vtkobj.SetScalarRange(rng)
Show on old repository browser