Skip to content

Instantly share code, notes, and snippets.

@viktorasm
Last active March 30, 2022 15:12
Show Gist options
  • Save viktorasm/16f8ebf3f314b1b942d6a7f880e25950 to your computer and use it in GitHub Desktop.
Save viktorasm/16f8ebf3f314b1b942d6a7f880e25950 to your computer and use it in GitHub Desktop.
A little utility to run inside Maya's script editor (Python tab!) to troubleshoot ngSkinTools installation issues.
print "-------------------------------------------"
import sys
import os
from maya import cmds
print "Environment info:"
print "Maya version:", cmds.about(installedVersion=True)
print "Maya API version:", cmds.about(apiVersion=True)
print cmds.about(operatingSystem=True), cmds.about(operatingSystemVersion=True)
print
ngstPath = [i for i in sys.path if "ngskintools" in i.lower()]
print "Checking python path:"
if ngstPath:
print "ngSkinTools found in python path:"
print "\n".join(map(lambda x: " * "+x, ngstPath))
from ngSkinTools import version
print "UI version:", version.pluginVersion()
else:
print "ngSkinTools not in python path"
print
print "Checking plugin path..."
ngstPluginPath = [i for i in os.getenv("MAYA_PLUG_IN_PATH").split(os.path.pathsep) if "ngskintools" in i.lower()]
if ngstPluginPath:
print "ngSkinTools found in plugin path:"
print "\n".join(map(lambda x: " * "+x, ngstPluginPath))
print "loading plugin..."
result = cmds.loadPlugin('ngSkinTools')
print "plugin loaded:", cmds.pluginInfo('ngSkinTools', q=True, path=True)
print "plugin version:", cmds.pluginInfo('ngSkinTools', q=True, version=True)
else:
print "ngSkinTools not in plugin path"
print
print "opening ngSkinTools UI..."
from ngSkinTools.ui.mainwindow import MainWindow
MainWindow.open()
print "done."
print "-------------------------------------------"
-------------------------------------------
Environment info:
Maya version: Autodesk Maya 2018.4
Maya API version: 20180400
win64 Microsoft Windows 8 Home Premium Edition, 64-bit (Build 9200)
Checking python path:
ngSkinTools found in python path:
* C:\ProgramData\Autodesk\ApplicationPlugins\ngskintools\Contents\scripts
UI version: 1.7.6
Checking plugin path...
ngSkinTools found in plugin path:
* C:/ProgramData/Autodesk/ApplicationPlugins/ngskintools/Contents/plug-ins
* C:/ProgramData/Autodesk/ApplicationPlugins/ngskintools/Contents/plug-ins/2018
loading plugin...
# Warning: Plug-in, "ngSkinTools.mll", is already loaded. Skipped. #
plugin loaded: C:/ProgramData/Autodesk/ApplicationPlugins/ngskintools/Contents/plug-ins/2018/ngSkinTools.mll
plugin version: 1.7.6
opening ngSkinTools UI...
done.
-------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment