guide.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:mgear 作者: miquelcampos 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号