Commit Graph

144839 Commits

Author SHA1 Message Date
Bastien Montagne
62b84f4eab I18N: updated UI translations from git/weblate repository (60566c7b2accdf). 2024-12-30 16:25:29 +01:00
Michael Kowalski
9abe161b58 USD: USDHook.py format fix 2024-12-30 10:17:35 -05:00
Michael Kowalski
8285d2d82e USD: update USDHook.py example
Updated the example to include new hook functions
material_import_poll and on_material_import as well
as the new import_texture and export_texture
utilities which were introduced in #131559.

Also reformatted the existing documentation to include
subheaders and internal links, as the previous paragraph
format became difficult to follow.

Pull Request: https://projects.blender.org/blender/blender/pulls/132259
2024-12-30 15:50:08 +01:00
Jesse Yurkovich
eb39d81afa Fix #132396: Orbit Gizmo navigation used wrong math operation
Regression from 3d0988a719 where two adds
were accidentally changed to subtracts.

Pull Request: https://projects.blender.org/blender/blender/pulls/132440
2024-12-30 02:55:52 +01:00
Jonas Holzman
f6bbcaba6d UI: Improve Studio Lights Editor layout
Improve the Studio Lights Editor Preferences panel by replacing the
current column layout (which looks very horizontally compressed using
the default Preferences window size) by a grid flow layout with boxes.

Pull Request: https://projects.blender.org/blender/blender/pulls/132425
2024-12-30 00:40:07 +01:00
Ray Molenkamp
de3accb68a Cleanup: CMake: Modernize bf_draw dependencies
Pretty straightforward

- Remove any bf_draw paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132411
2024-12-28 21:38:19 +01:00
Ray Molenkamp
95c1a5e4fe Cleanup: CMake: Modernize bf_imbuf_movie dependencies
Not entirely straightforward, some manual edits were done since when
this library was created, some of the work was already done.

- Remove any bf_imbuf_movie paths from INC
- Add a dependency though LIB when missing
- Add public dependency to bf_imbuf in bf_imbuf_movie since it uses the
  imbuf headers in its public headers.
- Fix namespace not to have underscores

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132407
2024-12-28 20:53:18 +01:00
Ray molenkamp
10c5493746 Cleanup: CMake: Modernize bf_geometry dependencies
Pretty straightforward

- Remove any bf_geometry paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132375
2024-12-28 19:58:14 +01:00
Alaska
dd5a1522b7 Tests: Speed up volume render tests
In a previous commit I accidentally added a test that had
these properties:
- High resolution (512x512)
- High sample count (512)
- Had high quality denoising enabled

By reducing the resolution to 128x128 and sample count to 32
and disabling denoising, the test will hopefully be 256x faster.
2024-12-28 06:27:46 +01:00
Alaska
8efd41271d Compositor: Add OIDN Quality to denoise node
This commit exposes the "Quality" option of the Open Image Denoiser
to the user for the denoise node in the compositor.

There are a few quality modes:
- High - Highest quality, but takes the longest to process.
- Balanced - Slightly lower quality, but usually halves
the processing time compared to High.
- Fast - Further reduce the quality, for a small increase in
speed over Balanced.

Along with that there is a `Follow Scene` option which will use the
quality set in the scene settings.

This allows users that have multiple denoise nodes
(E.g. For multi-pass denoising), to quickly switch all nodes between
different quality modes.

Performance (denoising time):
High: 13 seconds
Balanced: 6 seconds
Fast: 5 seconds

Test setup:
CPU: AMD Ryzen 9 5950X
Denoising a 3840x2160 render

---

Follow ups:
Ideally the "Denoise Nodes" UI panel in the render properties panel
would be hidden if the compositor setup does not contain any
denoise nodes.

However implementing this efficiently can be difficult and so it was
decided this task was outside the scope of this commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/130252
2024-12-28 01:44:49 +01:00
Gerard Taulats
02b1e5a48f Fix #94152 #97677: Fix cursor update over UI buttons
Use window->tag_cursor_refresh rather than WM_cursor_set when changing
cursor for numerical inputs. This works better since this allows a
change directly to a region-specified cursor rather than always to
default first.

Pull Request: https://projects.blender.org/blender/blender/pulls/132185
2024-12-27 23:50:27 +01:00
Ray molenkamp
0de684eba6 CMake: Raise LINK_INTERFACE_MULTIPLICITY to 3
The internal blender library dependency loops are longer than
the default cmake settings account for. As the work in [1]
adds more dependencies where they are needed this has become
a problem.

Bumping to 3 now as it solves the immediate linker problems in
#132375 but we can bump this further in the future if needed.

[1] https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132385
2024-12-27 22:45:43 +01:00
Jesse Yurkovich
da7e7a0e80 Fix: Handle null Action during armature export
Regressed during fix for [1]. A null action is possible so we need to
provide a default name when this happens.

[1] 69c63311fa

Pull Request: https://projects.blender.org/blender/blender/pulls/132381
2024-12-27 21:46:48 +01:00
Aras Pranckevicius
95233ecf65 Tests: cover more VSE blend effects
Alpha Under, Over Drop, Add, Multiply
2024-12-27 20:26:49 +02:00
Jonas Holzman
b99497bf21 macOS: Fix path icon not being cleared when creating a new file
This commit fixes a small bug where the macOS native titlebar file path
icon (often referred to as proxy icon) wouldn't be cleared when creating
a new blank file and would instead retain its previous state. This was
caused by the GHOST setPath() function being short-circuited by the
&& operator, since `has_filepath` was false. The GHOST WindowCocoa
setPath() function was also simplified to remove unneeded exception
handling.

Pull Request: https://projects.blender.org/blender/blender/pulls/132359
2024-12-27 18:15:23 +01:00
Ray Molenkamp
ebb7bdd922 Cleanup: CMake: Modernize bf_sequencer dependencies
Pretty straightforward

- Remove any bf_sequencer paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132358
2024-12-27 17:44:02 +01:00
Aras Pranckevicius
2720bd529d Refactor: split off VSE effects code into separate files
Part of #130975: split off overly large VSE effects.cc (almost 4000
lines) into separate source files. No behavior changes.

- Add / Subtract / Multiply all go into one source file,
- Blend Over / Blend Under / Over Drop / other blend modes all go
  into one source file,
- Cross and Gamma Cross go into one source file,
- All others go into their own files.

Pull Request: https://projects.blender.org/blender/blender/pulls/132323
2024-12-27 12:52:38 +01:00
Omar Emara
d4008562dd Fix #131552: Backdrop has a wrong size of 256x256
The compositor backdrop in certain files always have a size of 256x256
regardless of the actual size of the viewer image. That's because the
compositor writes its result to a different image buffer than the one
the image engine reads its image buffer from. And the image engine
assumes a default size of 256x256. The reason is a bit involved.

For non multi-view images, the image module uses the special cache index
value of IMA_NO_INDEX for the compositor backdrop, which works fine if
the image was detected as a non multi-view image in the first place.
However, this detection fails because the compositor may still write
multi-view images even for non multi-view renders.

In particular, before the compositor writes its viewer image, it ensures
correct views by calling BKE_image_ensure_viewer_views, which first
checks if we need to recreate the views of the viewer image if they
don't match the render views. And in the case of non multi-view image,
that check fails in one case.

Functions like BKE_image_is_multiview checks if a single unnamed view
exists in the image, unnamed being the keyword here. The root issue is
that BKE_image_ensure_viewer_views only checks that a single view
exists, while it should also check that it is unnamed. Which happens
when the user enabled multi-view, added only one view, then disabled
multi-view again.

To fix this, we add a check for the name of the view in case of non
multi-view images. And additionally pull the view matching code into its
own documented utility function for clarity.

Pull Request: https://projects.blender.org/blender/blender/pulls/132348
2024-12-27 12:09:41 +01:00
Iliya Katueshenock
b3762d5820 Fix #124499: improve maximum instance recursion error message
Mentioning the object and geometry name can help track down the issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/124976
2024-12-27 12:03:03 +01:00
Omar Emara
ca2462ef2a Fix: Legacy Cryptomatte asserts with invalid inputs
The Legacy Cryptomatte node asserts when its inputs are not valid,
that's because it is specialized for image inputs and invalid inputs are
single values. To fix this, make sure only valid Cryptomatte layers are
considered.
2024-12-27 09:51:06 +02:00
Philipp Oeser
9759e532d2 Fix #132264: Vertex Edge slide wrong
Caused by 580e0af309

The above commit fixed the condition that caused the hang in #128702 but
it also changed the `while` loop to a `do while`.
The do while loop executes the content of the loop once before checking
the condition of the while.
Whereas a while loop will check the condition first before executing the
content.

As a consequence, we could (falsely) enter the loop and return with a
(false) best direction.

To resolve, keep the check from 580e0af309 but go back to a `while`
loop (instead of the `do while).

Needs to go into 4.2 LTS

Pull Request: https://projects.blender.org/blender/blender/pulls/132270
2024-12-27 07:07:44 +01:00
Jesse Yurkovich
953fa94fb3 Cleanup: USD: Delay creation of the import hook prim_map
Delay the creation of the `prim_map` data structure until the last
possible moment. This is more efficient in the majority of cases where
no Import hooks have been defined. Additionally, it removes the need for
locking in the `read_object_data` code path once we implement concurrent
loading.

Pull Request: https://projects.blender.org/blender/blender/pulls/132360
2024-12-27 03:36:22 +01:00
Jesse Yurkovich
becaeac6da Fix: Prevent stack-buffer-overflow inside BoneInstanceData ctor
The `math::transform_point` call returns a `float3` which is being fed
into a `float4` matrix row. This causes an out of bounds read to occur.

Use the `float4` constructor taking an explicit `w` parameter to avoid
the issue.

----
To trigger the ASAN error: Add a Metaball to the viewport
```
==61887==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f0ce84c5cac at pc 0x000000b1a6fe bp 0x7ffc5ae10070 sp 0x7ffc5ae10060
READ of size 4 at 0x7f0ce84c5cac thread T0
    #0 0xb1a6fd in blender::VecBase<float, 4>::VecBase(float const*) /home/deadpin/source/blender-git/blender/source/blender/blenlib/BLI_math_vector_types.hh:219
    #1 0x62ef86e in blender::draw::overlay::BoneInstanceData::BoneInstanceData(blender::MatBase<float, 4, 4, 16> const&, blender::VecBase<float, 3> const&, float, float const*) (/home/deadpin/source/blender-git/build_asan/bin/blender+0x62ef86e) (BuildId: 6ae47f47805212d94d20c0872511ec90333cb6b5)
    #2 0x63b2136 in blender::draw::overlay::Metaballs::object_sync(blender::draw::Manager&, blender::draw::ObjectRef const&, blender::draw::overlay::Resources&, blender::draw::overlay::State const&) /home/deadpin/source/blender-git/blender/source/blender/draw/engines/select/../overlay/overlay_next_metaball.hh:85
```

Pull Request: https://projects.blender.org/blender/blender/pulls/132288
2024-12-26 22:30:53 +01:00
Ray Molenkamp
43d47d272a Cleanup: CMake: Modernize bf_asset_system dependencies
Pretty straightforward

- Remove any bf_asset_system paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132357
2024-12-26 20:47:53 +01:00
Ray Molenkamp
167c15e0c0 Cleanup: CMake: Modernize bf_nodes dependencies
Pretty straightforward

- Remove any bf_nodes paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132356
2024-12-26 19:52:49 +01:00
Ray Molenkamp
16eb4430f5 Cleanup: CMake: Modernize bf_render dependencies
Pretty straightforward

- Remove any bf_render paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132355
2024-12-26 18:50:53 +01:00
Aras Pranckevicius
34e24f53c8 Cleanup: STL I/O struct defaults 2024-12-26 18:24:17 +02:00
Aras Pranckevicius
55083363b8 Cleanup: OBJ export struct defaults
This makes OBJExportParamsDefault in tests code not needed anumore
2024-12-26 18:16:57 +02:00
Aras Pranckevicius
06c9a7f4ea Cleanup: PLY I/O struct defaults, C++ style enums
- Initialize PLYExportParams/PLYImportParams members
- Use enum class in ePLYVertexColorMode
- Pass import/export params as reference

This kind of fixes #126337: previously in the PLY Import node the
import paramters were all set to zero/false values, instead of sane
defaults. Which meant that it ignored vertex colors.
2024-12-26 17:54:35 +02:00
Harley Acheson
7a1e95ea91 Fix #117353: Improved Selection From Fonts Folder
when selecting a font the current code only shows the folder nicely
with filtering and preview listing when the current folder is blank.
This PR shows it nicely always.

Pull Request: https://projects.blender.org/blender/blender/pulls/132318
2024-12-26 03:00:19 +01:00
Ray Molenkamp
a0d9826b3c Cleanup: CMake: Modernize bf_imbuf dependencies
Pretty straightforward

- Remove any bf_imbuf paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132336
2024-12-25 23:32:15 +01:00
Ray Molenkamp
4dcef4421c Cleanup: CMake: Modernize bf_functions dependencies
Pretty straightforward

- Remove any bf_functions paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132335
2024-12-25 19:46:31 +01:00
Ray Molenkamp
a23aab3ddc Cleanup: CMake: Modernize bf_blenloader dependencies
Pretty straightforward

- Remove any bf_blenloader paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132334
2024-12-25 18:40:41 +01:00
Ray Molenkamp
c331c6b50e Cleanup: CMake: Modernize bf_blentranslation dependencies
Pretty straightforward

- Remove any bf_blentranslation paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132311
2024-12-25 17:40:25 +01:00
Omar Emara
459c940284 Cleanup: Remove redundant ntreeCompositExecTree
Removes ntreeCompositExecTree since it just calls COM_execute.
2024-12-25 08:38:28 +02:00
Ray Molenkamp
54604efdfd Cleanup: CMake: Modernize bf_windowmanager dependencies
Pretty straightforward

- Remove any bf_windowmanager paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132310
2024-12-24 22:40:38 +01:00
Harley Acheson
0ba91e9870 Fix #102347: Maximum Width for Status Bar Report Banners
This report shows a long report (measures 19,714 pixels) overflowing in
such a way that the banner shows nothing across the entire width of the
window. This PR just adds a maximum width to the banner size so it will
show a subset of the report correctly.

Pull Request: https://projects.blender.org/blender/blender/pulls/132307
2024-12-24 19:28:49 +01:00
SensArice
1098f434b0 Geometry Nodes: Find in String node
Add a node that finds the number of times a substring occurs in a string,
and the position of the start of the first match.

See the PR description for more rational and details.

Pull Request: https://projects.blender.org/blender/blender/pulls/129270
2024-12-24 17:12:19 +01:00
Hans Goudey
949b9638f5 BLO: Add read/write utility functions for int16 arrays
Pull Request: https://projects.blender.org/blender/blender/pulls/132306
2024-12-24 17:05:26 +01:00
Bastien Montagne
d7dd21996c Cleanup: Document that IDType.name is also used in linked ID paths. 2024-12-24 14:01:08 +01:00
Omar Emara
d8ede978ca Fix: Compositor: Reading multi-layer images is not thread safe
Reading an EXR multi-layer image in the compositor is not thread safe.
That's because the code access the render result without holding a
reference to it. To fix this, acquire the render result when accessing
the render result structure.

Pull Request: https://projects.blender.org/blender/blender/pulls/132300
2024-12-24 12:55:46 +01:00
Bastien Montagne
2c9ab53273 Add 'system python' validation for some py scripts.
The goal of this test is to try to import some critical py scripts with the
system python of the building machine.
The main target is to ensure that these py scripts remain usable by all
buildbot machines, as some of them are using fairly outdated python
versions.

Current status:
* Scripts in `build_files` and `docs` are checked.
* Some python scripts in `build_files` were 'reverted' to be compatible
  with older required python version currently (3.6).
* A few scripts are excluded from the test, mostly because they use Blender's
  `bpy` module, which means they are only intended to be ran with Blender's
  python anyway.
* The test is only enabled for Linux buildbots currently, as they use the
  oldest Python by far.

Notes:
* Some more scripts are likely to be moved around in the future.
* Whether these tests need to be enabled on windows or macos platforms remains
  an open question.

Pull Request: https://projects.blender.org/blender/blender/pulls/130746
2024-12-24 11:55:29 +01:00
Bastien Montagne
2040b8e864 Re-enable big endian versioning tests for MacOS.
As can be seen in https://builder.blender.org/admin/#/builders/134/builds/8983 and https://builder.blender.org/admin/#/builders/135/builds/8835, MacOS buildbots ran these tests 101 times without any issue. b0eeae782eba7f5 can be used to do that test again locally if needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/132273
2024-12-24 11:54:54 +01:00
Aras Pranckevicius
33ef338aca Cleanup: split ffmpeg movie writing into smaller source files, debug print cleanups
- Split off audio related code out of movie_write.cc into
  movie_write_audio.cc
- Rename very generic PRINT debug logging macro name to FF_DEBUG_PRINT,
  and use "ffmpeg:" prefix in the printed messages
- Other tiny simplifications

Pull Request: https://projects.blender.org/blender/blender/pulls/132233
2024-12-24 11:36:54 +01:00
Omar Emara
118dc65baa Fix #132210: Cryptomatte doesn't work with image sequences
The Cryptomatte node doesn't work with image sequences that starts at a
non-zero frame. That's because the typename of the Cryptomatte is not
necessary updated at a frame that exists in the sequence, so the node
fails entirely.

To fix this, we always compute the typename at the frame of the first
image in the sequence.
2024-12-24 10:58:35 +02:00
Dan-Gry
f363b09e6e Fix #132120: Separate Menu Class for Adding Empty Objects
This PR adds a separate menu class for adding empty objects, rather
than using operator_menu_enum. This way the menu can be extended by
python.

Pull Request: https://projects.blender.org/blender/blender/pulls/132192
2024-12-23 22:31:33 +01:00
Harley Acheson
e0930e0173 Fix #79702: Do Not Process Character Input With Win Key
Windows Only. When the Blender active area is Text Editor, pressing
Win-L will lock the computer, and will also add an "L" to the text
editor. This is an annoyance when script editing. This PR just makes
anything entered with Win key held return nothing.

Pull Request: https://projects.blender.org/blender/blender/pulls/131638
2024-12-23 22:26:24 +01:00
Ray Molenkamp
b7407aabb5 Cleanup: CMake: Modernize bf_gpu dependencies
Pretty straightforward

- Remove any bf_gpu paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132286
2024-12-23 21:38:19 +01:00
Hans Goudey
e315816dc5 Cleanup: Resolve unused function warnings without ffmpeg 2024-12-23 15:22:51 -05:00
Ray Molenkamp
a7c39896c6 Cleanup: CMake: Modernize bf_blenkernel dependencies
Pretty straightforward

- Remove any bf_blenkernel paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132282
2024-12-23 20:08:37 +01:00