This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def importSkinToSelection(filePath=None, *args): | |
if not filePath: | |
f1 = 'mGear Skin (*{0} *{1})'.format(FILE_EXT, FILE_JSON_EXT) | |
f2 = ";;gSkin Binary (*{0});;jSkin ASCII (*{1})".format( | |
FILE_EXT, FILE_JSON_EXT) | |
f3 = ";;All Files (*.*)" | |
fileFilters = f1 + f2 + f3 | |
filePath = pm.fileDialog2(fileMode=1, | |
fileFilter=fileFilters) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya.cmds as mc | |
defaults = ['UI', 'shared'] | |
def children_count(ns): | |
return ns.count(':') | |
namespaces = [ns for ns in mc.namespaceInfo(lon=True, r=True) if ns not in defaults] | |
namespaces.sort(key=children_count, reverse=True) |