-
Notifications
You must be signed in to change notification settings - Fork 0
/
PaneTabTypeMenu.xml
60 lines (56 loc) · 2.7 KB
/
PaneTabTypeMenu.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file defines the items that appear in the pane tab type menu.
Files named the same (ie. PaneTabTypeMenu.xml) can exist in
$HOME/houdiniX.Y/ directory and will supplement the original definitions
found in $HFS/houdini/ (aka $HH).
The format in this file is similar to the format in $HH/MainMenuMaster
except that it uses the <menuDocument> and <menu> tags instead of
<mainMenu> and <menuBar>. See the comments in that file for more advanced
customization abilities.
Another difference here is that most menu items in this file have no labels
because they are dynamically created by Houdini. If labels are supplied to
the items which currently have no labels in this file, they will be
ignored.
Note that the id's correspond to their hotkeys with the h.pane
prefix (where available). For example, the item with id,
"scene_view", refers to the action in the hotkeys manager as
"h.pane.scene_view".
Also note that you can specify which context a particular menu item shows
up in. To do this, add a context expression property. For example, to make
the menu item appear only for translate parameters you can do:
<context>
<expression>hou.curDesktop().name() == "Build"</expression>
</context>
For context expressions and menu scripts, a 'kwargs' python dictionary is
provided with the following values:
'panetab' : The pane tab (hou.PaneTab object) that the menu was
opened for. When creating a new pane tab then `panetab`
is set to None.
To insert a Python Panel interface into the menu, place an <actionItem> element
into the XML with the "id" set to "pythonpanel::__interface_name__" where
"__interface_name__" is the name of the Python Panel interface.
For example, to insert a new "myInterface" Python Panel into the menu, you can do:
<actionItem id="pythonpanel::myInterface">
<label>Label for My Interface</label>
</actionItem>
Or to move the Autorigs (Python Panel) tool to a new location, then
insert into the XML:
<actionItem id="pythonpanel::sesi_auto_rigs">
<label>Autorigs</label>
</actionItem>
-->
<menuDocument>
<!-- menuDocument can only contain 1 menu element, whose id is
implicitly "root_menu"
-->
<menu>
<actionItem id="pythonpanel::oli::gallery">
<context>
<expression>hou.getenv("OLI_HIDE_MENU_MAIN", "0").lower() not in ["true", "1", "t"]</expression>
</context>
<insertAtIndex>0</insertAtIndex>
<label>oli Gallery</label>
</actionItem>
</menu>
</menuDocument>