def set_up_exr_output(self, path):
    bpy.context.scene.use_nodes = True
    tree = bpy.context.scene.node_tree
    links = tree.links
    for node in tree.nodes:
        tree.nodes.remove(node)
    render_node = tree.nodes.new(type='CompositorNodeRLayers')
    out_node = tree.nodes.new(type='CompositorNodeOutputFile')
    out_node.format.file_format = 'OPEN_EXR_MULTILAYER'
    out_node.base_path = str(path)
    layers = ['Image', 'Depth', 'Vector', 'UV', 'Normal', 'CryptoObject00']
    out_node.file_slots.clear()
    for l in layers:
        out_node.file_slots.new(l)
        links.new(render_node.outputs.get(l), out_node.inputs.get(l))
def set_up_exr_output(self, path):
    bpy.context.scene.use_nodes = True
    tree = bpy.context.scene.node_tree
    links = tree.links
    for node in tree.nodes:
        tree.nodes.remove(node)
    render_node = tree.nodes.new(type='CompositorNodeRLayers')
    out_node = tree.nodes.new(type='CompositorNodeOutputFile')
    out_node.format.file_format = 'OPEN_EXR_MULTILAYER'
    out_node.base_path = str(path)
    layers = ['Image', 'Depth', 'Vector', 'UV', 'Normal', 'CryptoObject00']
    out_node.file_slots.clear()
    for l in layers:
        out_node.file_slots.new(l)
        links.new(render_node.outputs.get(l), out_node.inputs.get(l))