Fix #134920: File Output writes frame for single render
The File Output node always appends the frame number even if the render is not an animation. This patch makes it such that the frame number is only written if the render is an animation. The user can use a frame variable to manually append the frame number if needed. The command line rendering interface already uses animation rendering in all cases, so it should not be affected. However, rendering using the render.render() operator with animation=False will see the behavior change, however, setting animation=False and start_frame and end_frame to the same frame number should be sufficient to restore the old behavior. Pull Request: https://projects.blender.org/blender/blender/pulls/141209
This commit is contained in:
@@ -209,7 +209,7 @@ class FileOutputTest(unittest.TestCase):
|
||||
# Set output directory for all existing file output nodes.
|
||||
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()
|
||||
bpy.ops.render.render(animation=True, start_frame=1, end_frame=1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user