Compositor: Redesign File Output node
This patch redesigns the File Output node to provide better UX and UI. This is mainly achieved by allowing the user to create inputs by dragging into an Extend socket and adjust existing inputs using the familiar UI list design available in Blender. Additionally, various UI changes were done: - The Use Node Format option was renamed to Override Node Format for clarity. - Socket types are now fixed and do not change as new links are made, allowing users to specify the exact output type and employ implicit conversion if needed. - The distinction between images and Multi-Layer EXR was made clearer. - Final output paths are drawn in the UI to remove guess work. - The Base Path was split into a Directory and a File Name. - Panels were added to group options, include a panel for the node format, items, and item formats. Pull Request: https://projects.blender.org/blender/blender/pulls/141091
This commit is contained in:
@@ -197,16 +197,17 @@ class FileOutputTest(unittest.TestCase):
|
||||
self.assertTrue(ok)
|
||||
|
||||
def run_test_script(self, blendfile, curr_out_dir):
|
||||
def set_basepath(node_tree, base_path):
|
||||
def set_directory(node_tree, base_path):
|
||||
for node in node_tree.nodes:
|
||||
if node.type == 'OUTPUT_FILE':
|
||||
node.base_path = f'{curr_out_dir}/'
|
||||
node.directory = f'{curr_out_dir}/'
|
||||
node.file_name = ""
|
||||
elif node.type == 'GROUP' and node.node_tree:
|
||||
set_basepath(node.node_tree, base_path)
|
||||
set_directory(node.node_tree, base_path)
|
||||
|
||||
bpy.ops.wm.open_mainfile(filepath=blendfile)
|
||||
# Set output directory for all existing file output nodes.
|
||||
set_basepath(bpy.data.scenes[0].compositing_node_group, f'{curr_out_dir}/')
|
||||
set_directory(bpy.data.scenes[0].compositing_node_group, f'{curr_out_dir}/')
|
||||
bpy.data.scenes[0].render.compositor_device = f'{self.execution_device}'
|
||||
bpy.ops.render.render()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user