-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathZync.ms
39 lines (38 loc) · 1.03 KB
/
Zync.ms
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
-- Zync render menu extension script
macroScript RenderWithZync
category: "Menu Rendering"
tooltip: "Render with Zync"
(
on execute do
(
local maxScriptPath = getThisScriptFilename()
local pythonScriptPath = substituteString maxScriptPath "Zync.ms" "zync_3dsmax.py"
python.ExecuteFile pythonScriptPath
)
)
if menuMan.registerMenuContext 0x3c0c52e7 then
(
local renderMenuItem
local mainMenuBar = menuMan.getMainMenuBar()
for i = 1 to mainMenuBar.numItems() do
(
local menuItem = mainMenuBar.getItem(i)
if menuItem.getTitle() == "&Rendering" then
(
renderMenuItem = mainMenuBar.getItem(i)
exit
)
)
local renderMenu = renderMenuItem.getSubMenu()
local newAction = menuMan.createActionItem "RenderWithZync" "Menu Rendering"
for i = 1 to renderMenu.numItems() do
(
local menuItem = renderMenu.getItem(i)
if menuItem.getTitle() == "Render" then
(
renderMenu.addItem newAction (i + 1)
exit
)
)
menuMan.updateMenuBar()
)