示例#1
0
 def __exit__(self, type, value, traceback):
     p = self.parent()
     #Ensure we set the parent back to a layout not some ui element
     # like say a button which does not accept children
     if not cmds.layout(p, exists=True):
         p = p.parent()
         
     #However we want to be careful not to attach to a rowGroupLayout(textFieldButtonGrp etc)
     # in this case set the parent to the rowGroupLayout's parent
     if cmds.objectTypeUI(p) == u'rowGroupLayout':
         p = p.parent()
     cmds.setParent(p)
     return p
示例#2
0
文件: uitypes.py 项目: eahneahn/pymel
 def children(self):
     # return [ PyUI( self.name() + '|' + x) for x in self.__melcmd__(self, q=1, childArray=1) ]
     kids = cmds.layout(self, q=1, childArray=1)
     if kids:
         return [PyUI(self.name() + '|' + x) for x in kids]
     return []
 def children(self):
     #return [ PyUI( self.name() + '|' + x) for x in self.__melcmd__(self, q=1, childArray=1) ]
     kids = cmds.layout(self, q=1, childArray=1)
     if kids:
         return [PyUI(self.name() + '|' + x) for x in kids]
     return []
示例#4
0
 def children(self):
     # return [ PyUI( self.name() + '|' + x) for x in self.__melcmd__(self, q=1, childArray=1) ]
     return [PyUI(self.name() + "|" + x) for x in cmds.layout(self, q=1, childArray=1)]