1
2
3
4
5
6
7
8
9
10
11
12
13
14 """Module implements a command that allows to load all available Pvv commands."""
15 from ViewerFramework.VFCommand import Command, CommandGUI
16 from mglutil.gui.InputForm.Tk.gui import InputFormDescr
17 import os
18
19
21 """Command to load all available Python Volume Viewer commands"""
22
24 Command.__init__(self)
25 self.package = "Volume.Pvv"
26
27
29 pass
30
31
33 self.doitWrapper()
34
35
36 - def doit(self, **kw):
37 library='modlib'
38 modu = __import__(self.package+'.modlib',
39 globals(), locals(), [library])
40 for entry in modu.modlist:
41
42 self.vf.loadModule(entry[1], self.package)
43
44
46 apply(self.doitWrapper,(),kw)
47
48
49 commandGUI = CommandGUI()
50 menuName = 'Load All Commands'
51 menuIndex = 25
52 commandNames = {'vli':'LoadAll', 'utvolren': 'LoadAll'}
53 commandList = [{'name':'', 'cmd': None, 'gui':None}]
54
55
57 for dict in commandList:
58 viewer.addCommand(dict['cmd'], dict['name'], dict['gui'])
59