Ejemplo n.º 1
0
def CreateNode(ntree, nodeType, nodeName=None, unique=True):
    nodeLabel = nodeName

    if nodeName is None:
        nodeName = LibUtils.GetUUID()

    if nodeName in ntree.nodes:
        if not unique:
            return ntree.nodes[nodeName]
        else:
            nodeName = LibUtils.GetUUID() + nodeName

    node = ntree.nodes.new(nodeType)
    node.name = nodeName
    node.label = nodeLabel

    return node
Ejemplo n.º 2
0
def CreateFakeName():
    return ".VRayFakeTexture@%s" % LibUtils.GetUUID()