问题 I want to add two different items that have the same name to a TreeView but they have a different parent. But I get the error: Item 'layer 7' already exists in the TreeView What should I do to avoid this. My code: import maya.cmds as cmds import os window = cmds.window() layout = cmds.formLayout() control = cmds.treeView( parent = layout, numberOfButtons = 0, abr = False ) cmds.formLayout(layout,e=True, attachForm=(control,'top', 2)) cmds.formLayout(layout,e=True, attachForm=(control,'left',