Distributed rendering of single images #104327
@ -200,22 +200,21 @@ for link in node_tree.links:
|
||||
feed_in_output = link.to_socket
|
||||
break
|
||||
|
||||
from os import listdir
|
||||
from os.path import isfile, join
|
||||
from pathlib import Path
|
||||
|
||||
root = "${path.join(renderDir, path.basename(renderOutput))}/######"
|
||||
image_files = [f for f in listdir(root) if isfile(join(root, f))]
|
||||
root = Path("${path.join(renderDir, path.basename(renderOutput))}/######")
|
||||
image_files = [f for f in root.iterdir() if f.is_file()]
|
||||
|
||||
separate_nodes = []
|
||||
first_crop_node = None
|
||||
translate_nodes = []
|
||||
for i, image_file in enumerate(image_files):
|
||||
image_node = node_tree.nodes.new('CompositorNodeImage')
|
||||
image_node.image = bpy.data.images.load(root + '/' + image_file)
|
||||
image_node.image = bpy.data.images.load(str(root / image_file.name))
|
||||
|
||||
crop_node = node_tree.nodes.new('CompositorNodeCrop')
|
||||
crop_node.use_crop_size = True
|
||||
left, top, right, bottom = image_file.split('-')
|
||||
left, top, right, bottom = image_file.stem.split('-')
|
||||
if left == '0':
|
||||
crop_node.min_x = 0
|
||||
crop_node.max_x = ${settings.tile_size_x}
|
||||
|
Loading…
Reference in New Issue
Block a user