1
2
3 import os.path
4 import nuke
5
6
7
9 pluginList = []
10 if nuke.env['nc']:
11 plugins = nuke.plugins(nuke.ALL | nuke.NODIR, "*."+nuke.PLUGIN_EXT, "*.ofx.bundle", "*.gizmo", "*.gznc")
12 else:
13 plugins = nuke.plugins(nuke.ALL | nuke.NODIR, "*."+nuke.PLUGIN_EXT, "*.ofx.bundle", "*.gizmo")
14 for i in plugins:
15 (root, ext) = os.path.splitext(i)
16 (root, ext) = os.path.splitext(root)
17
18
19 if root is None or len(root) == 0:
20 continue
21 if not root[0] == '@':
22 pluginList.append(root)
23 n = nuke.menu("Nodes").addMenu("Other/"+menuname)
24 pluginList.sort()
25
26 def addToCommands(plugin):
27 s = plugin.upper()
28 p = n.addMenu(s[0])
29 p.addCommand(plugin, "nuke.createNode('"+plugin+"')")
30
31
32 internalDependencies = { "Shuffle2":["Shuffle", "ShuffleCopy"] }
33 for plugin in pluginList:
34 if plugin in internalDependencies:
35 map(addToCommands, internalDependencies[plugin])
36 addToCommands(plugin)
37