forked from jtomori/batch_textures_convert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPARMmenu.xml
30 lines (28 loc) · 827 Bytes
/
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
<?xml version="1.0" encoding="UTF-8"?>
<menuDocument>
<menu>
<subMenu id="open_in">
<label>Open in...</label>
<insertBefore />
<context>
<expression>len(kwargs["parms"]) > 0 and kwargs["parms"][0].parmTemplate().type().name() == "String"</expression>
</context>
<scriptItem id="batch_tex_convert">
<insertAfter />
<label>Batch textures convert</label>
<scriptCode>
<![CDATA[
import os
import batch_convert
path = kwargs["parms"][0].eval()
if path != "":
path = hou.expandString(path)
path = os.path.normpath(path)
path = os.path.dirname(path)
batch_convert.runGui(path=path)
]]>
</scriptCode>
</scriptItem>
</subMenu>
</menu>
</menuDocument>