api.py 文件源码

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

项目:OBB 作者: chrisdevito 项目源码 文件源码
def getShape(self,  node):
        """
        Gets the shape node from the input node.

        :param node (str): string name of input node

        Raises:
            `RuntimeError` if no shape node.
        Returns:
            (str) shape node name
        """
        if cmds.nodeType(node) == 'transform':
            shapes = cmds.listRelatives(node, shapes=True)

            if not shapes:
                raise RuntimeError('%s has no shape' % node)

            return shapes[0]

        elif cmds.nodeType(node) == "mesh":
            return node
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号