Esempio n. 1
0
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