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]
评论列表
文章目录