Commit Graph

8 Commits

Author SHA1 Message Date
Campbell Barton
c8302a08e8 PyAPI: match word order from Scene.frame_start/end
For the render operator match word order from Scene.frame_start/end.

Ref !147169
2025-10-02 22:07:06 +00:00
Brecht Van Lommel
ab644f2ecb Tests: Compare all subimages in compositor file output tests
For multilayer files it was only comparing the first pass, so any issues
with other passes would be missed.

Also don't clear the filename for multilayer file output nodes, as that
doesn't work when there are multiple such nodes all writing to the same
file name. This will be used in an upcoming EXR multipart writing test.

Ref #146650

Pull Request: https://projects.blender.org/blender/blender/pulls/146726
2025-09-25 15:02:13 +02:00
Brecht Van Lommel
790527b149 Fix: Compositor test should ignore Software metadata with Blender version
OpenEXR files now write the Blender version, so this would fail
comparing metadata when we bump it.

Pull Request: https://projects.blender.org/blender/blender/pulls/146711
2025-09-24 18:08:44 +02:00
Omar Emara
b10d767c4e 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
2025-09-12 09:01:31 +02:00
Omar Emara
68dc278fe5 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
2025-08-07 14:46:34 +02:00
Habib Gahbiche
d04ae09aff Compositor: remove scene.node_tree from Python API
Since we are removing `scene.use_nodes` in #143578, most developers
will have to update their python script by replacing `scene.node_tree`
by `scene.compositing_node_group` in order to create a new compositing
 node tree anyways. So we remove `scene.node_tree`.

Note: `scene->nodetree` in `scene_blend_write()` is still being written
to the blend file, so forward compatibility is not affected by this PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/143619
2025-08-01 10:30:11 +02:00
Habib Gahbiche
4e069f8f5a Tests: Compositor: update failing images only
Previously, when a file output test failed, all images within the same
test case were updated, even images that did not cause the test to fail.

This patch only updates changed/removed images so when the test is run
using `BLENDER_TEST_UPDATE=1 ctest -R compositor_cpu_file_output` git
will only show the modified, added or removed images

Pull Request: https://projects.blender.org/blender/blender/pulls/134852
2025-02-24 12:09:06 +01:00
Habib Gahbiche
0db8710df7 Compositor: Regression tests for File Output Node
The patch adds a simple framework to test the File Output Node in the compositor. The main difference to the existing `render_test.py` framework is that multiple output images are supported. Edge cases such as empty output or too many outputs are supported as well.

Tests can be run like other compositor tests, e.g. `ctest -R compositor_cpu_file_output --verbose` or `BLENDER_TEST_UPDATE=1 ctest -R compositor_cpu_file_output` to update failing tests.

Sample output:
```
...
119: [ RUN      ] Running test single_color...
119: [  PASSED  ] Passed
119: [ RUN      ] Running test png_passes...
119: [  PASSED  ] Passed
119: [ RUN      ] Running test mixed...
119: [  FAILED  ] Test directory /home/guest/blender-git/blender/tests/data/compositor/file_output/mixed does not exist
119: [ RUN      ] Updating test mixed...
119: [ RUN      ] Running test no_files...
119: [  PASSED  ] Passed
...
```

Parent task: https://projects.blender.org/blender/blender/issues/125893

Pull Request: https://projects.blender.org/blender/blender/pulls/133663
2025-02-14 16:17:18 +01:00