-
Notifications
You must be signed in to change notification settings - Fork 117
/
PARMmenu.xml
423 lines (370 loc) · 11.7 KB
/
PARMmenu.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file defines the menu items when right-clicking over parameters in
Houdini.
Files named the same (ie. PARMmenu.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.parms.
prefix (where available). For example, the item with id,
"revert_to_prev_val", refers to the action in the hotkeys manager as
"h.pane.parms.revert_to_prev_val".
For scriptItem elements, a 'kwargs' python dictionary is provided with the
following values:
'parms' : A list of hou.Parm objects which the script was invoked
upon.
'toolname' : The menu item's hotkey id (ie. the element's id
prefixed with h.pane.parms.)
'altclick' : True if the Alt key was also pressed, False otherwise
'ctrlclick' : True if the Ctrl key was also pressed, False otherwise
'shiftclick' : True if the Shift key was also pressed, False otherwise
'cmdclick' : True if the Option key was also pressed, False
otherwise. Note that this can only be true on OSX.
-->
<menuDocument>
<!-- menuDocument can only contain 1 menu element, whose id is
implicitly "root_menu"
-->
<menu>
<scriptItem id="toggle_abs_rel_path_ql">
<label>Toggle Absolute/Relative OP Path(s) [qL]</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_string(kwargs)
</expression>
</context>
<modifyItem><insertAfter>revert_to_prev_val</insertAfter></modifyItem>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.toggle_abs_rel_path(kwargs)
]]></scriptCode>
</scriptItem>
<scriptItem id="switch_spaces_newlines_ql">
<label>Switch Spaces/Newlines [qL]</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_string(kwargs)
</expression>
</context>
<modifyItem><insertAfter>toggle_abs_rel_path_ql</insertAfter></modifyItem>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.switch_spaces_newlines(kwargs)
]]></scriptCode>
</scriptItem>
<subMenu id="qlib_more_menu">
<label>More [qL]</label>
<modifyItem><insertAfter>motion_effects_menu</insertAfter></modifyItem>
<scriptItem id="ql_set_as_playback_start_frame">
<label>Set as Playback Start Frame</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_framenum(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.set_as_playback_range(kwargs)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_set_as_playback_end_frame">
<label>Set as Playback End Frame</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_framenum(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.set_as_playback_range(kwargs, startFrame=False)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_set_as_playback_frame_range">
<label>Set as Playback Frame Range</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_framerange(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.set_as_playback_range(kwargs)
]]></scriptCode>
</scriptItem>
<separatorItem/>
<scriptItem id="ql_open_in_file_browser">
<label>Open as Path in File Browser...</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_fspath(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.open_as_fs_path(kwargs)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_open_in_mplay">
<label>Open in MPlay...</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_fspath(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.open_in_mplay(kwargs)
]]></scriptCode>
</scriptItem>
<separatorItem/>
<scriptItem id="ql_select_target_op">
<label>Select/Add Target Node(s)</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_has_target_node(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.select_target_nodes(kwargs)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_expand_target_op_wildcards">
<label>Expand Target Node Path Wildcards</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_has_target_node(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.expand_target_wildcards(kwargs)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_copy_all_values_to_clipboard">
<label>Copy All Parm Values to Clipboard</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_copyable(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.copy_all_parm_values_to_clipboard(kwargs)
]]></scriptCode>
</scriptItem>
<separatorItem/>
<scriptItem id="ql_set_to_parent_network_1">
<label>[subnet]: Parent Network, Input #1 (0)</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_string(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools
qlibmenutools.set_parent_opinput(kwargs, 0)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_set_to_parent_network_2">
<label>[subnet]: Parent Network, Input #2 (1)</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_string(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools
qlibmenutools.set_parent_opinput(kwargs, 1)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_set_to_parent_network_3">
<label>[subnet]: Parent Network, Input #3 (2)</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_string(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools
qlibmenutools.set_parent_opinput(kwargs, 2)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_set_to_parent_network_4">
<label>[subnet]: Parent Network, Input #4 (3)</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_string(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools
qlibmenutools.set_parent_opinput(kwargs, 3)
]]></scriptCode>
</scriptItem>
<separatorItem/>
<scriptItem id="ql_add_parm_value_multiplier">
<label>Add Value/Multiplier to Parameter</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_float(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.add_parm_value_multiplier(kwargs)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_add_parm_value_multiplier_exp">
<label>Add Value/Multiplier + Exponent</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_float(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.add_parm_value_multiplier(kwargs, add_exponent=True)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_set_rampbasis_label">
<label>Set Ramp to...</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_ramp(kwargs)
</expression>
</context>
</scriptItem>
<separatorItem/>
<scriptItem id="ql_set_rampbasis_Constant">
<label>Constant</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_ramp(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.set_ramp_basis(kwargs, hou.rampBasis.Constant)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_set_rampbasis_linear">
<label>Linear</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_ramp(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.set_ramp_basis(kwargs, hou.rampBasis.Linear)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_set_rampbasis_CatmullRom">
<label>Catmull-Rom</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_ramp(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.set_ramp_basis(kwargs, hou.rampBasis.CatmullRom)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_set_rampbasis_MonotoneCubic">
<label>Monotone Cubic</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_ramp(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.set_ramp_basis(kwargs, hou.rampBasis.MonotoneCubic)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_set_rampbasis_Bezier">
<label>Bezier</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_ramp(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.set_ramp_basis(kwargs, hou.rampBasis.Bezier)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_set_rampbasis_BSpline">
<label>B-Spline</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_ramp(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.set_ramp_basis(kwargs, hou.rampBasis.BSpline)
]]></scriptCode>
</scriptItem>
<scriptItem id="ql_set_rampbasis_Hermite">
<label>Hermite</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_ramp(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.set_ramp_basis(kwargs, hou.rampBasis.Hermite)
]]></scriptCode>
</scriptItem>
<separatorItem/>
<scriptItem id="ql_use_as_descriptive_parm">
<label>Use as Descriptive Parm</label>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_descriptive(kwargs)
</expression>
</context>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.use_as_descriptive_parm(kwargs)
]]></scriptCode>
</scriptItem>
</subMenu>
<subMenu id="qlib_string_rel_ref_menu">
<label>Reference Upstream Parm [qL]</label>
<modifyItem><insertAfter>qlib_more_menu</insertAfter></modifyItem>
<context>
<expression>
import qlibmenutools
return qlibmenutools.parm_is_string(kwargs)
</expression>
</context>
<scriptMenuStripDynamic id="qlib_string_rel_ref_items">
<contentsScriptCode><![CDATA[
import qlibmenutools
return qlibmenutools.build_upstream_channel_refs_menu(kwargs)
]]></contentsScriptCode>
<scriptCode><![CDATA[
import qlibmenutools; qlibmenutools.set_upstream_channel_ref_value(kwargs)
]]></scriptCode>
</scriptMenuStripDynamic>
</subMenu>
</menu>
</menuDocument>