dag.py 文件源码

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

项目:mgear 作者: miquelcampos 项目源码 文件源码
def findComponentChildren2(node, name, sideIndex):
    """Returns the component children of input component root.

    This function is using Maya cmds instead of PyMel

    Note:
        This method is specific to work with shifter guides naming conventions

    Arguments:
        node (dagNode): The input node to search
        name (str): The name to search
        sideIndex (str): the side

    Returns:
        dagNode list: The children dagNodes

    >>> objList =  dag.findComponentChildren(self.parent,
                                             oldName,
                                             oldSideIndex)

    """
    children = []
    for item in cmds.listRelatives(node.name(), allDescendents=True,
                                   type="transform"):
        checkName = item.split("|")[-1].split("_")
        if checkName[0] == name and checkName[1] == sideIndex:
            children.append(item)

    return [pm.PyNode(x) for x in children]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号