def addObjectsToScrollList(objs):
"""puts the list of things in the textScrollList"""
clearScrollList()
stringSearch = cmds.checkBox(widgets["stringMatchCB"], q=True, v=True)
searchText = ""
checkedObjs = []
if stringSearch:
searchText = getSearchText()
if stringSearch and searchText:
for obj in objs:
# check if the string is in the name of obj
if searchText.lower() in obj.lower():
checkedObjs.append(obj)
else:
checkedObjs = objs
for x in checkedObjs:
#---------------- here add rt click functions to select all shapes or select transform (if shape)
cmds.textScrollList(widgets["resultsTSL"], e=True, a=x, doubleClickCommand=selectItemInList)
评论列表
文章目录