I have a text scroll list that lists all of the nCloth objects in the scene, or just the nCloth objects the user has selected. For each object in the list, I want to attach a popupMenu with a basic rename command and a few other things that I defined elsewhere. I figured right clicking and then selecting an option would be better than littering my UI with 10 clunky buttons.
What I was thinking of doing was something like this:
clothList = mc.textScrollList("nClothList", query=True, allItems=True)
startNum = 1
endNum = len(clothList)
for obj in range(startNum, endNum+1):
# attach my popupMenu to obj
I'm still relatively new to scripting (this is my first Python script ever). This seems to me like it's a good option, but I feel like there might be a better way to do it. I'd appreciate any opinions.
Thank you so much!