Can’t say I’m thrilled about the installation process for xMesh. You should be able to choose where you want the plugins installed to and then you can dynamically generate an init in a secondary folder (optionally). We don’t install Nuke plugins to local HDDs in order to maintain consistency between every machine. We have a shared nuke_path on our NAS which every machine looks to.
Thanks for the feedback. We will take this under consideration.
The current behavior should be the default. The out of the box experience should have the plugin installed and ready to go, and also be consistent with our other products.
Ben.
Here is a proposed superior layout.
FYI (I assume you’ll want to delete this attached zip when you download)
You now have one init.py to manage and one menu.py. Having two menu.py’s and two init pys creates some weirdness in at least our setup. I also created a node toolbar item for Thinkbox which I will also add Deadline to.
[size=85]Attachments
xMesh.zip (removed)
(695.99 KiB) Downloaded 6 times[/size]
And an improved Thinkbox.png
Yeah, we added the space in between Xmesh and NK just to mess with you.
The Foundry does not guarantee forward compatibility for point releases so it’s going to stay 7.0 and 6.3.
Common scripts looks good, just need to get it to work in the installer. It may require reference counting so the uninstall options doesn’t remove items when they are still in use.
The icon looks good. Where are you suggesting it get used? I don’t think I included a Thinkbox icon.
Ben
Thinkbox icon is being used for our Thinkbox menu item.
# Toolbar
if nuke.NUKE_VERSION_MAJOR == 7:
toolbar = nuke.toolbar("Nodes")
XMToolbar = toolbar.addMenu("Thinkbox", icon='Thinkbox.png')
XMToolbar.addCommand("xMesh Reader",'nuke.createNode("XMeshSource")', icon='XMeshLoader_icon.png')
Note I added a conditional to the menu so that it only adds everything if the plugin is loaded.
BTW I’m noticing that some of my code was a bit redundant in the init.py since I’ll be adding the plugin paths later.
[code]#XMesh for Nuke
if nuke.NUKE_VERSION_MAJOR >= 7:
nuke.pluginAddPath(’./icons’)
nuke.addSequenceFileExtension("xmesh");
nuke.addSequenceFileExtension("xmdat");
else:
print ‘INFO xMesh not loading, only available for Nuke 7+’
if nuke.NUKE_VERSION_MAJOR == 7:
print ‘INFO: Adding XMesh for Nuke 7’
nuke.pluginAddPath(’./plugins/Nuke 7’)
elif nuke.NUKE_VERSION_MAJOR == 8:
print ‘INFO: Adding XMesh for Nuke 8’
nuke.pluginAddPath(’./plugins/Nuke 8’)
[/code]
If we wanted to support a single point of installation (init.py) instead of one for every version, we would need a standard, out of the box method for this. Otherwise I’m sending one init.py per version anyway.
- ‘C:/Users//.nuke’, [per user]
- ‘C:\Program Files\Common Files/Nuke/7.0/plugins’, [per Major Version]
- ‘C:/Program Files/Nuke7.0v8/plugins/user’, [per install]
- ‘C:/Program Files/Nuke7.0v8/plugins’ [per install]
- NUKE_PLUGIN_PATH [not guarenteed to exist]
I know, Nuke’s defaults are a little disappointing in this regard. /user/.nuke is our preferred location since users are the most permanent. That being said, what I would recommend is to just have an init.py in ‘/common files/Nuke/x.x/plugins/’ that just says:
nuke.pluginAddPath("C:/Program Files/Thinkbox/xMesh NK")
We could add an option to choose a custom init.py to link in, or none. But the default will be to install to the machine.