Skip to content

Instantly share code, notes, and snippets.

@redglasses67
Created May 24, 2022 04:11
Show Gist options
  • Save redglasses67/14ad2770e4dc08c1b21759442c6a7809 to your computer and use it in GitHub Desktop.
Save redglasses67/14ad2770e4dc08c1b21759442c6a7809 to your computer and use it in GitHub Desktop.
Add Icon path to XBMLANGPATH
import maya.mel as mel
try:
xbmLangPaths = mel.eval("getenv XBMLANGPATH;")
except:
xbmLangPaths = ''
addPath = r";D:/Test/icons"
if not addPath in xbmLangPaths:
xbmLangPaths += addPath
mel.eval('putenv "XBMLANGPATH" "{}";'.format(xbmLangPaths))
#xbmLangPaths = mel.eval("getenv XBMLANGPATH;").split(";")
#for path in xbmLangPaths:
# print(path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment