` This is the function that i wrote the operation, where om = optionMenu
def selection(*args):
selected = cmds.optionMenu(om,sl=True, q=True)
cmds.textScrollList(tsl, e=True, removeAll=True)
for item in temp[selected]:
cmds.textScrollList(label=item, parent=om)
`
So basically I have object types in the OM and all the objects in TSL, I wanna display items of only selected object types from OM, for example if I select "mesh" in the OM the TSL will display only mesh objects.
where OM = optionMenu and TSL - textScrollList