コード例 #1
0
ファイル: control.py プロジェクト: jspatrick/beings
def getStorableXforms(inNodeList=None, categories=None):
    """Return all nodes in the scene from the category"""
    result = nodeTag.getNodesWithTag(STORABLE_TAG_NAME)
    if inNodeList is not None:
        result = list(set(inNodeList).intersection(result))

    if categories:
        assert isinstance(categories, list)
        categories=set(categories)

        tmp = result
        result = []

        for node in tmp:
            nodeCategories = nodeTag.getTag(node, STORABLE_TAG_NAME)['categories']
            if set(nodeCategories).intersection(categories):
                result.append(node)

    return result