-
Notifications
You must be signed in to change notification settings - Fork 4
/
MainMenuCommon.xml
103 lines (78 loc) · 3.39 KB
/
MainMenuCommon.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0" encoding="UTF-8"?>
<mainMenu>
<menuBar>
<!-- ============================ File Menu ============================= -->
<addScriptItem id="h.hammer_previous_files">
<label>Open Previous Files...</label>
<parent>file_menu</parent>
<insertAfter>recent_files</insertAfter>
<context>
<expression>
from hammer_tools.settings import SettingsManager
return SettingsManager.instance().value('hammer.previous_files.enable')
</expression>
</context>
<scriptCode>
from hammer_tools.previous_files import showPreviousFiles
showPreviousFiles()
</scriptCode>
</addScriptItem>
<!-- <subMenu id="file_menu">-->
<!-- <subMenu id="hammer_dependencies">-->
<!-- <label>Dependencies</label>-->
<!-- <insertAfter>recent_projects</insertAfter>-->
<!-- <scriptItem>-->
<!-- <label>Collect Files...</label>-->
<!-- <scriptCode>-->
<!--<!–from hammer_tools.collect_project_files import collectProjectFiles–>-->
<!--<!–collectProjectFiles()–>-->
<!--import hammer_tools.collect_project_files as collector-->
<!--reload(collector)-->
<!--collector.collectProjectFiles()-->
<!-- </scriptCode>-->
<!-- </scriptItem>-->
<!-- <separatorItem />-->
<!-- <scriptItem>-->
<!-- <label>Find Missing Geometry Files</label>-->
<!-- </scriptItem>-->
<!-- <scriptItem>-->
<!-- <label>Find Missing Images</label>-->
<!-- </scriptItem>-->
<!-- <scriptItem>-->
<!-- <label>Find Missing Textures</label>-->
<!-- </scriptItem>-->
<!-- <scriptItem>-->
<!-- <label>Find Missing Audio</label>-->
<!-- </scriptItem>-->
<!-- </subMenu>-->
<!-- </subMenu>-->
<!-- ========================= Preferences Menu ========================= -->
<addScriptItem id="h.prefs_hammer_tools">
<label>Hammer Tools</label>
<parent>preferences_submenu</parent>
<insertAfter/>
<scriptCode>
from hammer_tools.settings_ui import HammerSettingsDialog
window = HammerSettingsDialog(hou.qt.mainWindow())
window.show()
</scriptCode>
</addScriptItem>
<!-- ========================= Windows Menu ========================= -->
<addScriptItem id="h.hammer_material_library">
<label>Material Library</label>
<parent>windows_menu</parent>
<insertAfter>h.mat_palette</insertAfter>
<!-- <context>-->
<!-- <expression>-->
<!-- from hammer_tools.settings import SettingsManager-->
<!-- return SettingsManager.instance().value('hammer.previous_files.enable')-->
<!-- </expression>-->
<!-- </context>-->
<scriptCode>
from hammer_tools.material_library.viewer_window import MaterialLibraryViewerWindow
hou.session.material_library = MaterialLibraryViewerWindow(hou.qt.mainWindow())
hou.session.material_library.show()
</scriptCode>
</addScriptItem>
</menuBar>
</mainMenu>