def getObjects2(self, model, includeShapes=True):
"""Get the objects of the component.
Args:
model(dagNode): The root of the component.
includeShapes (boo): If True, will include the shapes.
Returns:
list of dagNode: The list of the objects.
"""
objects = {}
if includeShapes:
children = [pm.PyNode(x) for x in cmds.listRelatives(
model.longName(), ad=True, fullPath=True)]
else:
children = [pm.PyNode(x) for x in cmds.listRelatives(
model.longName(), ad=True, typ='transform', fullPath=True)]
for child in children:
cName = child.longName()
if cName.startswith(self.fullName):
objects[cName.split("_")[-1]] = child
return objects
评论列表
文章目录