Commit MetaInfo

Revisão0e3caa1cfa5f42eaae26b71ac565a96cef867945 (tree)
Hora2013-03-03 21:46:22
Autorbijoux
Commiterbijoux

Mensagem de Log

new ControlPanelItem as TupleParameter

Mudança Sumário

Diff

diff -r 8ffa33ebcb70 -r 0e3caa1cfa5f src/experiment/vtk_tree_pylafiii.py
--- a/src/experiment/vtk_tree_pylafiii.py Sun Mar 03 21:35:07 2013 +0900
+++ b/src/experiment/vtk_tree_pylafiii.py Sun Mar 03 21:46:22 2013 +0900
@@ -1,8 +1,11 @@
11 # coding: utf-8
22
3-#TODO: ネットリスト、コラボマップ用レシピの再構築
4-#TODO: パラメータパネル
5-#TODO: データクラスとデータパネル
3+#TODO: タプルパラメータパネルの追加
4+#TODO: 動的なターミナル表示とリンクの修正
5+#TODO: キャンバスウィジェット
6+#TODO: マップの保存とリストア
7+#TODO: パラメータの保存
8+#TODO: ウィンドウレシピとフレームワークメニュー
69
710 import vtk
811 import pylafiii as laf
@@ -38,11 +41,6 @@
3841 </collabomap>
3942 </recipe>
4043 '''
41-# laf.link(laf.port(rt.children['actor0'],'vtkobj'),laf.port(rt.children['actors'],'hook0'))
42-# laf.link(laf.port(rt.children['mapper0'],'vtkobj'),laf.port(rt.children['actor0'],'mapper'))
43-# laf.link(laf.port(rt.children['spheresource'],'output'),laf.port(rt.children['mapper0'],'input'))
44-# laf.link(laf.port(rt.children['actor1'],'vtkobj'),laf.port(rt.children['actors'],'hook1'))
45-# laf.link(laf.port(rt.children['actor2'],'vtkobj'),laf.port(rt.children['actors'],'hook2'))
4644
4745 if __name__ == '__main__':
4846 import Tkinter
@@ -63,25 +61,13 @@
6361 x = Test()
6462 laf.chef.cook_netlist(x,master=rt)
6563 tk.children['collabomap'].cook_collabomap(x)
66-# o = Renderer(name='renderer')
67-# o = TupledCombiner5(name='actors')
68-# o = Actor(name='actor0')
69-# o = PolyDataMapper(name='mapper0')
70-# o = SphereSource(name='spheresource')
71-# o = Actor(name='actor1')
72-# o = Actor(name='actor2')
7364 laf.link(laf.port(rt.children['renderer'],'vtkobj'),laf.port(w,'renderer'))
74-# laf.link(laf.port(rt.children['actors'],'collection'),laf.port(rt.children['renderer'],'actors'))
75-# laf.link(laf.port(rt.children['actor0'],'vtkobj'),laf.port(rt.children['actors'],'hook0'))
76-# laf.link(laf.port(rt.children['mapper0'],'vtkobj'),laf.port(rt.children['actor0'],'mapper'))
77-# laf.link(laf.port(rt.children['spheresource'],'output'),laf.port(rt.children['mapper0'],'input'))
78-# laf.link(laf.port(rt.children['actor1'],'vtkobj'),laf.port(rt.children['actors'],'hook1'))
79-# laf.link(laf.port(rt.children['actor2'],'vtkobj'),laf.port(rt.children['actors'],'hook2'))
80- # print rt.children['renderer'].vtkobj.GetActors()
81- #laf.port(rt.children['mapper0'],'vtkobj').unlink()
82- laf.port(rt.children['actor1'],'vtkobj').unlink()
83- # print rt.children['renderer'].vtkobj.GetActors()
84- #w.connect(rt.children['rnd'])
85-# del o
65+ #
66+ #FIXME: タプルブリッジの試験用
67+ # laf.port(rt.children['actor1'],'vtkobj').unlink()
68+ # o = laf.data.TupleBridge()
69+ # laf.link(laf.port(rt.children['spheresource'],'center'),laf.port(o,'value'))
70+ # del o
71+ #
8672 Tkinter.mainloop()
8773
\ No newline at end of file
diff -r 8ffa33ebcb70 -r 0e3caa1cfa5f src/pylafiii/chef.py
--- a/src/pylafiii/chef.py Sun Mar 03 21:35:07 2013 +0900
+++ b/src/pylafiii/chef.py Sun Mar 03 21:46:22 2013 +0900
@@ -340,7 +340,11 @@
340340 if isinstance(logic,data.TupleBridge) and k == 'value':
341341 # ただし、タプルブリッジについては value を無視しないと無限再帰呼び出しになってしまうのを回避する
342342 continue
343- #FIXME: 分解パネルの作成
343+ # タプルパネルの作成
344+ w = Tkinter.LabelFrame(self,text=k); w.grid(column=0,row=i,columnspan=2)
345+ b = data.TupleBridge(w)
346+ v.link(laf.port(b,'value'))
347+ ControlPanel(w,logic=b).pack()
344348 else:
345349 # 通常は Entry リストを作成する
346350 if isproxyaccess:
Show on old repository browser