def getObjects(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.listRelatives(model, ad=True)
else:
children = pm.listRelatives(model, ad=True, typ='transform')
pm.select(children)
for child in pm.ls(self.fullName + "_*", selection=True):
objects[child[child.index(
self.fullName + "_") + len(self.fullName + "_"):]] = child
return objects
评论列表
文章目录