blender-v3.6-release backports #110011

Merged
Philipp Oeser merged 23 commits from lichtwerk/blender:blender-v3.6-release into blender-v3.6-release 2023-07-12 15:46:03 +02:00

23 Commits

Author SHA1 Message Date
Philipp Oeser a7221d2993 Fix #109802: Outliner "Blender File" view cant delete scene
buildbot/vexp-code-patch-coordinator Build done. Details
`outliner_do_scene_operation` wasnt recursive, so it only acted on the
top-level `TreeElement` (which was fine for Scenes view, but failed in
`Blender File` view).

Now use an iterator that handles open subhierarchies as well.

Pull Request: #109810
2023-07-12 14:49:56 +02:00
Philipp Oeser 86420289e3 Fix #109822: Average Brush in Vertex Paint Mode is broken
Caused by 7a943428de

Looking at history, e.g. 575ade22d4 or prior, it seems the
"fallthrough" [related compiler warning was removed in 7a943428de] was
actually intended in the case of `VPAINT_TOOL_AVERAGE`.

So first, the average color is calculated and after that regular drawing
should happen with that color.

Now make this more clear by calling both `calculate_average_color` as
well as `vpaint_do_draw` before breaking.

Pull Request: #109971
2023-07-12 14:48:43 +02:00
Hans Goudey 60b25936fe Fix: Build error in rigid body code with bullet turned off
Caused by 9c9664c823
2023-07-12 14:42:43 +02:00
Philipp Oeser 9ba5d63ed7 Fix #109928: issues adding rigid bodies via just the world collection
Selecting a rigid body world collection is supposed to set up rigid
bodies for all of its mesh members (if they are not rigid bodies
already), expected result would be just the same as if `Object` > `Rigid
Body` > `Add ...` was used.

Doing it via just the world collection had the following issues though:
- calculating mass would crash on such a freshly created rigid body
objects (be1b32e4e4 falsely assumed `ob->rigidbody_object` is always
present on evaluated objects -- without tagging for depsgraph updates
this is not the case though)
- rigid body simulation would not work even on these freshly created
rigid body objects

Now tag bmain relations and object transforms for update to make both of
these work (following code in `BKE_rigidbody_add_object` that is used
when adding these through `Object` > `Rigid Body` > `Add ...`)

Pull Request: #109961
2023-07-12 14:42:16 +02:00
Jorijn de Graaf fba02d14a7 Fix #109040: Don't calculate homogenous offset if viewspace offset is 0
Users were reporting offset issues when the retopology overlay
was disabled. The reason those issues were happening is because of
`vs_offset = min(vs_offset, vs_z * -0.5);`.
That line is necessary for proper functioning of the retopology
overlay, but causes issues at lower offset values (such as zero, when
the retopology overlay is disabled).

Fixes #109640

Pull Request: #109657
2023-07-12 14:32:43 +02:00
Jorijn de Graaf 41782dfd52 Fix #109662: Overlay: Always use 0 for retopo min offset when disabled
Using 0.0015f as minimum value on Apple makes sense when the retopology
overlay is enabled.
When disabled however, this will cause the shader to think the overlay
is enabled when it's not, affecting the color of faces.
Therefore the offset when disabled should always be zero.
I've removed the unnecessary define and shortened the name of the other
one.

Pull Request: #109658
2023-07-12 14:30:58 +02:00
Iliya Katushenock 696b1804dd Fix #109885: Check if BVH tree is null in correct place
The `BKE_bvhtree_from_pointcloud_get` function have requirements for
input point cloud argument and initialization of `BVHTreeFromPointCloud`
can be skipped. Due to `BVHTreeFromPointCloud` is not initialized by
default constructor, it can contains garbage data. To check if tree is
initialized field of `BVHTreeFromPointCloud`, return argument shouldn't
be ignored. `[[nodiscard]]` attributes is added.

Pull Request: #109892
2023-07-12 14:22:14 +02:00
Pratik Borhade 1795598c59 Fix #109898: Incorrect behavior when moving objects to linked collection
Do not move objects to a collection which is linked from another file.

Pull Request: #109957
2023-07-12 14:10:56 +02:00
Jason Fielder 937c72cf89 Fix #109389: Resolve Z-fighting artifacts in Metal
Resolves z-fighting artifact on Apple Silicon.

Authored by Apple: Michael Parkin-White

Pull Request: #109922
2023-07-12 14:10:17 +02:00
Jason Fielder d9ae68b9e3 Fix #106905: Increase OS version requirement for Metal on Intel
Certain feature requirements unsupported by older OS builds
caused failures when running Intel GPUs on older OS's.

This patch increases the minimum required OS version
to one which covers devices supporting all required features.

Authored by Apple: Michael Parkin-White

Pull Request: #109921
2023-07-12 14:09:27 +02:00
Campbell Barton 906128e9e7 Fix #109952: Unknown engine warning only shown when loading from a popup
Displaying the warning on file load depended on `wm->winactive`
being set, and didn't work when loading a file from the file-open
window or when loading files using a command-line argument.

Resolve using the first window as a fallback.
This happens to resolve #109770, although not freeing timers on exit
is likely to be an issue under other circumstances.
2023-07-12 14:08:51 +02:00
rBrenick be09111784 UI: Grey out ShapeKey list entry on mute
At a glance, it can be hard to see if a Shape Key has been muted or not.
This change greys out all the UI elements, instead of just the current value number.
All the functionality still works the same, purely a visual change.

Pull Request: #109857
2023-07-12 14:08:05 +02:00
Sergey Sharybin b831ef579b Fix #109887: Adding driver from python might crash
Originally was noticed when adding drivers to a rigid body., but
it could potentially happen with any configuration.

The reason for the crash was that the ID which was modified was
not tagged as such.

Modifying drivers from the interface are likely tagging for updates
from the operator. This change makes it so the python function also
does tagging.

It is not really how one would design the system nowadays, but it
is how the Blender historically handles such cases. A bigger refactor
is possible to move tags to the places where modification actually
happens, but it seems to be a better idea to tackle it as a separate
project which will be considered no-functional-changes.

Pull Request: #109895
2023-07-12 14:07:25 +02:00
Campbell Barton aef44c2d50 Fix invalid address-of operator (hidden by a cast)
While in practice this didn't cause problems,
it's misleading & unnecessary.
2023-07-12 14:06:46 +02:00
Campbell Barton 8142195f29 Fix memory leak when there are unexpectedly more than MAXSEQ strips 2023-07-12 14:05:58 +02:00
Guillermo Venegas 9383f4d067 Fix #109532: Added missing conversion from wl_fixed to int in Wayland
When blender is not focused and a selection is executed
with the mouse, since there is no conversion from `wl_fixed` to `int`,
the bounds of the selection can cause the selection box to be too large,
causing `draw_select_framebuffer_depth_only_setup` to fail when create
`g_select_buffer.texture_depth`.

Ref !109834
2023-07-12 14:05:15 +02:00
Brecht Van Lommel 155e1830bd Fix #103918: Cycles point cloud motion blur artifacts on the GPU
Change storage to consistently put xyz + radius in the motion blur attribute.

Pull Request: #109830
2023-07-12 14:03:49 +02:00
Hans Goudey 99d7e9fb55 Fix #109471: BMesh to Mesh conversion invalid UV boolean attribute data
First we copied the entire BMesh custom data layout to the Mesh, then we
decided not to copy some boolean layers like UV pinning if every value
was false. But that left the layers uninitialized. Instead, copy the
custom data layout _after_ finding which layers to skip.
2023-07-12 13:58:39 +02:00
Nikita Sirgienko a81dccceaf Cycles: Fix Out-Of-Bounds issues during Embree BVH building 2023-07-12 13:58:01 +02:00
Nikita Sirgienko ab457ae62e Cycles: Embree: Resolve padding-related issue during buffer creations 2023-07-12 13:57:22 +02:00
Campbell Barton 59ab70b594 Fix sequencer image cache holding references to freed keys
In some cases, freeing the image cache keys would not update
next/previous links - causing future updates to reference freed memory.

Also assert the `last_key` is never points to freed memory.
2023-07-12 13:56:39 +02:00
Campbell Barton fa2a28e96d Fix use-after free while transforming sequence strips
Resolve use after free & potential double-free introduced in [0].

[0]: fd51d2f97c
2023-07-12 13:54:29 +02:00
Brecht Van Lommel 5283ef4ce5 Fix #109562: Cycles HIP device not found on Debian
Try loading ROCm 5.x libraries specifically, as the .so without version
is only part of the development package.

Thanks to Lee Ringham investigating and proposing this solution.
2023-07-12 13:53:40 +02:00