def getScriptsUI(*args):
if cmds.window("thisWin", exists = True):
cmds.deleteUI("thisWin")
widgets["win"] = cmds.window("thisWin", w=300, h=200)
widgets["mainFLO"] = cmds.formLayout()
widgets["list"] = cmds.textScrollList(nr=10, w=300, dcc = executeCommand)
cmds.formLayout(widgets["mainFLO"], e=1, af = [(widgets["list"], "left", 0), (widgets["list"], "top", 0), (widgets["list"], "bottom", 30), (widgets["list"], "right", 0)])
widgets["button"] = cmds.button(l="Refresh List!", w=300, h= 30, bgc = (.8, .6, .3), c= getScripts)
cmds.formLayout(widgets["mainFLO"], e=1, af = [(widgets["button"], "left", 0), (widgets["button"], "right", 0), (widgets["button"], "bottom", 0)])
cmds.showWindow(widgets["win"])
#populate the list with the contents of the path
评论列表
文章目录