in Designer by
recategorized
itemIds = cmds.MGPickerView(query=True, ls='')

This will return every single item ID I have made within my picker, for every panel.

I would like to be able to list only the items from the panel I currently have selected.

Or I would like to be able to search through my list of IDs and verify which panel the ID belongs to, so I can sort the IDs by panel.

Is this possible?

1 Answer

0 votes
by
 
Best answer

You can use this command to return all the children/descendent ID of a certain panel/group:

# get direct children ids:
directChildren = cmds.MGPickerItem(panelId, q=True, children=0)
# get all descendent ids:
allDescendents = cmds.MGPickerItem(panelId, q=True, children=1)

You can also query any picker item's parent id:

parent = cmds.MGPickerItem(itemId, q=True, parent=True)

 

Categories

...