def getScripts(*args):
#### here we should search all possible places, create a separate tab for each location (folder name?)
#get the script path
usd = cmds.internalVar(usd=True)
print usd
#get list of files there
fls = os.listdir(usd)
fls.sort()
########### check whether the thing is a folder or not, should really just sort for .mel and .py, not exclude as I'm doing
########### sort files (by name)
counter = 1
for fl in fls:
print fl
if (fl.rpartition(".")[2] != "pyc") and (fl[-1] != "~"):
#if not in our dictionary, color it red
if (fl.rpartition(".")[0] in pythonRun):
cmds.textScrollList(widgets["list"], e=True, a=fl, lf = (counter, "boldLabelFont"))
elif (fl.rpartition(".")[2] == "mel"):
cmds.textScrollList(widgets["list"], e=True, a=fl, lf = (counter, "boldLabelFont"))
else:
#print "%s doesn't have its' shit together"%fl
cmds.textScrollList(widgets["list"], e=True, a=fl, lf = (counter, "smallObliqueLabelFont"))
counter +=1
评论列表
文章目录