################################################################################################ ####### mtListAttr creates a window listing the attributes of selected objects ######## ####### copywrite Marc Thyng 4.19.2007 ######## ####### version .9 ######## ####### next I will add a filter which allows easier sorting of attributes ######## ################################################################################################ import maya.cmds as cmds def mtListAttr(): mtWinName = cmds.window(t= "List Attributes") cmds.columnLayout(adjustableColumn = True, width = 100, ) filterLayout = cmds.frameLayout(label = "Filter", collapsable = True) cmds.columnLayout(adj=True) filterTextField = cmds.textField() cmds.textField(filterTextField, edit = True , enterCommand=(`changeFilter()`)) cmds.setParent(mtWinName) cmds.frameLayout(label = "attributes list", collapsable = True) mtScrollField = cmds.scrollField(text = "", h=690, wordWrap = False) cmds.showWindow(mtWinName) cmds.window(mtWinName, e=True, wh=(300, 790)) attributesListed = "" selected = cmds.ls(sl = True) print selected, "\n" for objects in selected: listOfAttr = cmds.listAttr(objects) for attributes in listOfAttr: attributesListed = attributesListed + (objects + "." + attributes + "\n") # cmds.textScrollList(mtScrollField, e=True, append = attributes) attributesListed = attributesListed + "\n\n" cmds.scrollField(mtScrollField, e=True, tx=attributesListed) def changeFilter(): print ("Do some stuff here") # newWin = cmds.window() # cmds.showWindow(newWin) # return "asdf" mtListAttr()