Commit Graph

150077 Commits

Author SHA1 Message Date
Hans Goudey
7c3a3669b6 Cleanup: Remove unused CustomData functions 2025-02-14 12:45:39 -05:00
Harley Acheson
c1866764b0 Merge branch 'blender-v4.4-release' 2025-02-14 09:42:48 -08:00
Bastien Montagne
70f77a5bf3 Merge branch 'blender-v4.4-release' 2025-02-14 18:41:43 +01:00
Harley Acheson
99d028cd7d Fix #134492: Do Not Assign Toggle Accelerators on First Pass
With ba9417470e we are assigning keyboard accelerator shortcuts to
menu items containing toggles. This PR makes the assignment to these
new items not occur on the first pass of doing so. This is less
disruptive in that first-letter shortcuts will remain the same from
prior versions, with only mid-word shortcuts possibly changing.

Pull Request: https://projects.blender.org/blender/blender/pulls/134526
2025-02-14 18:41:33 +01:00
Bastien Montagne
69f7530f7a Fix (unreported) invalid C-style allocation of non-trivial C++ data. 2025-02-14 18:39:24 +01:00
Falk David
e1ab205148 Merge branch 'blender-v4.4-release' 2025-02-14 18:33:24 +01:00
Falk David
bd5023349a Fix: Grease Pencil: Points copied from same stroke were not split
When copying (`Ctrl+C`) some ranges of points in the same stroke,
the points would still be copied as one stroke and not split into
multiple strokes.

This was a regression in behavior from 4.2.

Now we use the `remove_points_and_split` to split the selected
points into individual strokes.
2025-02-14 18:26:13 +01:00
Habib Gahbiche
bf4af64809 Cleanup: Tests: remove unnecessary --gpu argument
Pull Request: https://projects.blender.org/blender/blender/pulls/134582
2025-02-14 18:02:31 +01:00
Jacques Lucke
bb715caf94 Fix #134100: hair curves disappear when adding new curves without radius interpolation
The issue is that the existing curves did not have an explicitly set radius.
When adding new curves with an explicit radius, the radius of the old curves was
initialized to 0 and thus becoming invisible. This patch changes it so that all
the existing curves do get a default radius. The `radius_for_write` methods is
currently only used in places that overwrite the entire array, so adding the
default there shouldn't affect anything unintentionally.

Pull Request: https://projects.blender.org/blender/blender/pulls/134445
2025-02-14 17:41:59 +01:00
Xavier Hallade
f4092993dc Merge branch 'blender-v4.4-release' 2025-02-14 17:38:35 +01:00
Xavier Hallade
a5601f68db Fix: Restore Cycles oneAPI host memory fallback on Linux
free_memory queries were disabled due to runtime driver issues on Linux
when using jemalloc.
compute-runtime introduced a fix for these issues with
8527779778
which is part of versions 31740 and higher, and matches the currently
required min-driver version, so we can restore this feature.

Pull Request: https://projects.blender.org/blender/blender/pulls/134542
2025-02-14 17:37:27 +01:00
Bastien Montagne
e651be4ee7 Fix mistake in recent refactor of TaskPool.
Wrong assert in eb6cdbae76.
2025-02-14 17:29:48 +01:00
Bastien Montagne
eb6cdbae76 Refactor: Make TaskPool a 'real' C++ struct.
Now all creation, deletion and API is embedded in the struct. The
public API is only a thin wrapper around the struct API.

Previous code was mixing C and C++ code in confusing ways, and was
causing issues with changes worked on in blender/blender!134463, aiming
at better sanity and safety of our data allocations/creations and
freeing/deletions.

NOTE: There could likely be much more refactor fo this code, current
changes are kept to a (reasonable) minimum, to avoid spending too much
time on it.

Pull Request: https://projects.blender.org/blender/blender/pulls/134504
2025-02-14 17:22:29 +01:00
Bastien Montagne
c43a583370 Merge branch 'blender-v4.4-release' 2025-02-14 17:21:17 +01:00
Bastien Montagne
bbebf72a33 Cleanup: Add explicit defaults to MEM_new-allocated structs with no constructors.
While not strictly needed (currently!), relying on C++ 'default
initialization' is fragile and unreliable.
2025-02-14 17:07:23 +01:00
Bastien Montagne
7000c392ff Cleanup: Add explicit defaults to MEM_new-allocated structs with no constructors.
While not strictly needed (currently!), relying on C++ 'default
initialization' is fragile and unreliable.
2025-02-14 17:07:23 +01:00
Hans Goudey
0b891a68b1 Sculpt: Improve node tools performance for simpler changes
Currently node tools always adds a dependency graph update tag. In
sculpt mode this causes the paint BVH to be rebuilt, which causes a
complete rebuild of the sculpt mode draw data. Both are quite expensive
relative to most other operations. Also, node tools currenly always
uses the "geometry" sculpt undo type, which causes its own depsgraph
update tag.

Arguably a depsgraph geometry reevaluation shouldn't cause a rebuild of the
BVH and draw data, but that's a limitation that's out of scope for now.
Most tools in sculpt mode avoid adding a depsgraph tag when they don't
change mesh topology for this reason.

This PR gives node tools the ability to check if the output mesh has a
different topology than the input. When the topology is the same,
we can use one of the specialized sculpt undo types for positions,
masks, or face sets. Though when more than one of these attributes changes,
we're still forced to still use the geometry undo type because sculpt undo
steps can only handle a single type of change.

In the end this results in much better performance for most simple node
tools that just deform the mesh or change masks or face sets.

Pull Request: https://projects.blender.org/blender/blender/pulls/133842
2025-02-14 16:45:50 +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
Falk David
2cc6f7bbb5 Fix #133339: Grease Pencil: Ensure span attribute writers are valid
When calling the `lookup_or_add` functions on `MutableAttributeAccessor`
we need to make sure that the writer is actually created and the call
did not fail.

This fixes many of the instances where we would use an unchecked
attribute writer and potentially crash.

Pull Request: https://projects.blender.org/blender/blender/pulls/134413
2025-02-14 15:54:20 +01:00
Anthony Roberts
2dc1a5625d Merge branch 'blender-v4.4-release' 2025-02-14 14:45:03 +00:00
Anthony Roberts
d277d43831 Libs: Fix OCIO patch command for non-Windows ARM64 platforms
Pull Request: https://projects.blender.org/blender/blender/pulls/134576
2025-02-14 15:44:08 +01:00
Guillermo Venegas
7682258ff9 Refactor: UI: Use a Vector to store buttons in UI blocks
This changes the ui-blocks buttons storage from Listbase to Vector.

Major changes that might cause a performance considerations are
in `ui_but_update_from_old_block` that requires to track buttons when restoring
button state between block redraws or in  `uiItemFullR` that may needs to insert
uiButs in the middle of the vector to add decorators. This might not be as fast as
removing or inserting elements in the middle of a listbase container. Also buttons currently
don't know its position in the container, so to get the previous and next
button its required to make a lookup of the button in the container.

`UI_block_update_from_old> ui_but_update_from_old_block` restores the state
of buttons between frames, this is done by sequentially testing if a button is the
same as an old button, however since UI can be created procedurally some old buttons
may not be drawn while editing other button data, this requires an extra track of what
buttons may not match to a new button while comparing for restoring state, but still
this buttons may be candidates to match to an new button.

Not functional changes expected.
Ref: #117604

Co-authored-by: Julian Eisel <julian@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/127128
2025-02-14 15:29:26 +01:00
Anthony Roberts
8b1118451b Merge branch 'blender-v4.4-release' 2025-02-14 14:06:03 +00:00
Anthony Roberts
394d204758 Windows ARM64: Update libs to use patched OCIO
See #134568 for more details

Pull Request: https://projects.blender.org/blender/blender/pulls/134572
2025-02-14 15:03:17 +01:00
Anthony Roberts
f45acb5714 Merge branch 'blender-v4.4-release' 2025-02-14 13:20:22 +00:00
Anthony Roberts
cbfe542f61 Windows ARM64: Enable SIMD in OpenColorIO
Pull in a patch from December 2024 that didn't make it into a versioned release yet

This gives a speed-up of ~50% in some video rendering scenarios

Pull Request: https://projects.blender.org/blender/blender/pulls/134568
2025-02-14 14:12:39 +01:00
Sybren A. Stüvel
1feca529d8 Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-02-14 14:00:16 +01:00
Sybren A. Stüvel
62c21a0800 Fix: NLA Track Solo flag handling, in depsgraph and F-Curve iteration
This fixes the (unreported) issue where solo'ing an NLA track would only
play back animation when _any_ of the tracks were unmuted.

Some code considered a track to be muted when its `NLATRACK_MUTED` flag
was set regardless of the `NLATRACK_SOLO` flag, whereas other code did
consider the `NLATRACK_SOLO` flag.

Now all the code is consistent with what actual animation evaluation is
doing.

Pull Request: https://projects.blender.org/blender/blender/pulls/134500
2025-02-14 13:55:44 +01:00
Campbell Barton
bc43b6be90 Merge branch 'blender-v4.4-release' 2025-02-14 23:37:41 +11:00
Campbell Barton
79627e353d Fix #134537: Crash accessing colors in the UI with more than 4 elements
The UI code assumed buttons had no more than 4 elements
however Python scripts may define larger array sizes.

Resolve the bug by adding functions for array access that take an
array size limit to prevent buffer overflows (read & write).

Note that this only adds the "float" versions of these functions,
for completeness int & boolean can be supported as a separate commit.
2025-02-14 23:33:54 +11:00
Bastien Montagne
8525c0a28b Merge branch 'blender-v4.4-release' 2025-02-14 13:00:24 +01:00
Bastien Montagne
248d858475 Fix (unreported) invalid C-style allocation of non-trivial C++ data.
A bit less trivial than usual, since it was an 'array' of non-trivial
structs. Used a `blender::Array` instead.

NOTE: keeping changes to a minimum, there is much to refactor and
cleanup in this code.
2025-02-14 12:59:54 +01:00
Sybren A. Stüvel
c74f9e65ec Fix #134190: NLA track not evaluating when toggling its 'mute' setting
Add a new callback `setting_post_update` to the `bAnimChannelType`
that gets called after that setting was altered via the channel list
buttons and via `ANIM_channel_setting_set()`.

This is used when changing the NLA track SOLO and MUTE options, to
ensure that the dependency graph relationships get rebuilt.

This fixes #134190.

Pull Request: https://projects.blender.org/blender/blender/pulls/134347
2025-02-14 12:52:02 +01:00
Bastien Montagne
978f2d1caa Merge branch 'blender-v4.4-release' 2025-02-14 12:50:10 +01:00
Bastien Montagne
194e233d86 Fix (unreported) more invalid C-style allocation of non-trivial C++ data. 2025-02-14 12:23:38 +01:00
Ankit Meel
1a6800a11f Merge branch 'blender-v4.4-release' 2025-02-14 15:18:28 +05:30
Ankit Meel
13c3d95f52 Xcode/thumbnailer: rebuild error due to rpath
Fix duplicate rpath error on rebuild by using CMake target
property.

Pull Request: https://projects.blender.org/blender/blender/pulls/134527
2025-02-14 10:46:48 +01:00
Sean Kim
9d930c3b0f Tests: Add initial sculpt mesh render test
* Adds new entry into python CMakeLists.txt for running these tests
* Adds `sculpt_brush_render_tests.py` as the report runner and
  test data initializer for the sculpt tests.

This commit adds the ability to do render tests with the Draw brush in
Sculpt mode on a specified mesh by specifying and performing a stroke in
area-space coordinates.

Like other render tests, these tests map a single .blend file to a
single reference image. Currently we test the following cases:

* A "base" mesh.
* A mesh with a Subdiv modifier added but not applied to it.
* A mesh with a basis & relative shape key added.
* A mesh with the multiresolution modifier added.

The associated reference image used is 200x200 pixels, in testing
with the draw brush, even this small resolution was able to detect
differences in detail caused by major regressions.

In total, the new files in the associated assets repository sum up
to roughly 4.5 MB.

Other than the mesh and modifiers, each of the files also contains a
scene with a camera, with workbench settings set to use a matcap for
the final rendering to better highlight curvature differences.

Part of #130772

Pull Request: https://projects.blender.org/blender/blender/pulls/133602
2025-02-14 07:36:00 +01:00
Alaska
212d22e039 Merge branch 'blender-v4.4-release' 2025-02-14 17:10:41 +13:00
Alaska
fee2f10208 Fix: Incorrect ray depth on emission in Cycles OSL
This commit fixes a issue where ray depth for emissive objects
(E.g. Lights) was incorrect when using the ray depth output of the
light path node in Cycles OSL.

Pull Request: https://projects.blender.org/blender/blender/pulls/134496
2025-02-14 05:09:08 +01:00
Anthony Roberts
f90099550b Merge branch 'blender-v4.4-release' 2025-02-13 19:01:05 +00:00
Anthony Roberts
088262dfee Windows ARM64: Check and cache VSCMD version
This uses the same technique as the one earlier in the file, that checks the `VCToolsRedistDir` env var

Pull Request: https://projects.blender.org/blender/blender/pulls/134522
2025-02-13 19:59:31 +01:00
Brecht Van Lommel
b487bcd2bd Merge branch 'blender-v4.4-release' 2025-02-13 19:59:25 +01:00
Brecht Van Lommel
c87a269021 Fix #133953: Cycles oneAPI texture randomly renders black
* Do oneAPI copy optimization as part of host memory alloc and free, so
  it is properly released before host memory is freed.
* Synchronize after loading texture info, like CUDA and HIP.

https://projects.blender.org/blender/blender/pulls/134412
2025-02-13 19:58:56 +01:00
Brecht Van Lommel
f99f958c47 Refactor: Cycles: Add host_alloc/free to device API
This may be used for device to do host memory allocation in a way that
is more efficient for copy the host memory to the device.

Also rename and group device memory allocation functions for clarity.

Pull Request: https://projects.blender.org/blender/blender/pulls/134412
2025-02-13 19:58:56 +01:00
Bastien Montagne
aaef10e99e Merge branch 'blender-v4.4-release' 2025-02-13 19:31:28 +01:00
Bastien Montagne
455d419f1e Fix (unreported) invalid C-style allocation of non-trivial C++ data. 2025-02-13 19:24:17 +01:00
Hans Goudey
8fed30aff2 Fix #134485: Missing depsgraph tag when assigning material
Caused by 81a63153d0.

Previously this was done by BKE_objects_materials_sync_length_all.
Now that function only adds a tag when it actually does something.
2025-02-13 13:16:57 -05:00
Brecht Van Lommel
4786fbe774 Refactor: Remove extern "C" from most headers
The only remaining code in source/blender that must be compiled as C
is now datatoc generated code and the DNA defaults that use designated
initializers.

Pull Request: https://projects.blender.org/blender/blender/pulls/134469
2025-02-13 18:58:08 +01:00
Brecht Van Lommel
2fb6a30b23 Refactor: Build generated DNA files as C++
Pull Request: https://projects.blender.org/blender/blender/pulls/134469
2025-02-13 18:55:37 +01:00