Commit Graph

137328 Commits

Author SHA1 Message Date
Miguel Pozo
33005ad716 GPU: Non-blocking specialization constants compilation
Update the batch specializations compilation to allow using it in an
async way.

The implementation has 2 main limitations:
- Only one batch at a time can be processed, extra batches will be
  added to a queue.
- Binding a specialization variant that is still being compiled will fail.

Pull Request: https://projects.blender.org/blender/blender/pulls/123015
2024-06-20 18:02:44 +02:00
Pablo Vazquez
8cb0b347ae Fix: VSE readability for missing muted/media/datablock labels
With the recent change for labels to be black when not active/selected,
the hardcoded colors of missing media/data-blocks make it hard to read.

- Use a lighter color just like muted strips.
- Makes active/selected muted strips draw labels in full opacity, for consistency.
- Make muted strips a little less gray (50% instead of 80%)

Pull Request: https://projects.blender.org/blender/blender/pulls/123494
2024-06-20 17:36:58 +02:00
Sergey Sharybin
bab46b4f02 Fix: Crash opening new file after having one open with Subsirf
There is some special code in the Object's freeing which did
special checks for SubdivCCG based on the evaluated mesh state.
If the depsgraph is destroyed prior to the evaluated object it
makes object to access freed components of ID node.

The fix makes it so the evaluated ID is freed prior to freeing
components.
2024-06-20 17:02:55 +02:00
Philipp Oeser
5a8003091c Fix #123181: Sculpt Transform tools dont keep verts on the symmetry axis
From the user perspective, the transform tools in editmode and
sculptmode look like the same tools, the equal behavior could be
expected.

So now set vertices on the mirror axis (check with the same epsilon as
editmode transform) while transforming, replicating what
`mesh_transdata_mirror_apply` does.

Pull Request: https://projects.blender.org/blender/blender/pulls/123428
2024-06-20 15:41:23 +02:00
Jacques Lucke
ada367a0e9 Fix #119589: use-after-free when accessing not-fully-evaluated object geometry
While the evaluated result is not well defined, we expect Blender to not crash
when there are dependency cycles.

The evaluation of one object often takes the evaluated geometry of another
object into account. This works fine if the other object is already fully
evaluated. However, if there is a dependency cycle, the other object may not be
evaluated already. Currently, we have no way to check for this and were mostly
just relying on luck that the other objects geometry is in some valid state
(even if it's not the fully evaluated geometry).

This patch adds the ability to explicitly check if an objects geometry is fully
evaluated already, so that it can be accessed by other objects. If there are not
dependency cycles, this should always be true. If not, it may be false
sometimes, and in this case the other objects geometry should be ignored. The
same also applies to the object transforms and the geometry of a collection.

For that, new functions are added in `DEG_depsgraph_query.hh`. Those should be
used whenever accessing another objects or collections object during depsgraph
evaluation. More similar functions may be added in the future.
```
bool DEG_object_geometry_is_evaluated(const Object &object);
bool DEG_object_transform_is_evaluated(const Object &object);
bool DEG_collection_geometry_is_evaluated(const Collection &collection);
```

To determine if the these components are fully evaluated, a reference to the
corresponding depsgraph is needed. A possible solution to that is to pass the
depsgraph through the call stack to these functions. While possible, there are a
couple of annoyances. For one, the parameter would need to be added in many new
places. I don't have an exact number, but it's like 50 or so. Another
complication is that under some circumstances, multiple depsgraphs may have to
be passed around, for example when evaluating node tools (also see
`GeoNodesOperatorDepsgraphs`).

To simplify the patch and other code in the future, a different route is taken
where the depsgraph pointer is added to `ID_Runtime`, making it readily
accessible similar to the `ID.orig_id`. The depsgraph pointer is set in the same
place where the `orig_id` is set.

As a nice side benefit, this also improves the situation in simple cases like
having two cubes with a boolean modifier and they union each other.

Pull Request: https://projects.blender.org/blender/blender/pulls/123444
2024-06-20 15:24:38 +02:00
Pablo Vazquez
c2437d11de Fix: VSE strip text label readability
During the strips redesign it was tested to go with drop shadows but
in practice and based on user feedback it looks better without.

- Remove drop shadow.
- Use white text for active/selected strips, black for unselected.

Pull Request: https://projects.blender.org/blender/blender/pulls/123487
2024-06-20 15:10:33 +02:00
Clément Foucault
d3e4eb49a0 Fix: EEVEE: Broken Lightprobe sphere display
The vertex shader was not writting to the position
attribute output.
2024-06-20 15:06:28 +02:00
Jeroen Bakker
af72c1f21d EEVEE: Light probe resolution
EEVEE stores light probes using octahedral mapping. Compared to the previous
cubemap storage octahedral has less pixels. The 64x64 is becoming useless
and can be removed. This PR also enables generating light probe maps upto 4k.

Some issues were found: the offset of the sphere inside the atlas
was always set to mipmap level 0 offset. This was hidden because of the texture
wrapping. Also the offset was substracted from the local texture
coordinate when calculating the direction of the pixel. Might be that due
to the incorrect offset (mipmap level 0), the latter issue was never detected.

Pull Request: https://projects.blender.org/blender/blender/pulls/123074
2024-06-20 15:02:11 +02:00
Brecht Van Lommel
5a2053a8b6 Fix: Missing description for Copy Global Transform add-on 2024-06-20 14:25:04 +02:00
Brecht Van Lommel
633dbe0292 Snap: Add appstream common-id
This makes it easier to query Blender through the snapcraft API.

Fix #123473
2024-06-20 13:59:57 +02:00
Campbell Barton
1eda5bca68 Fix error with all local extensions showing as orphan
Also correct wording in install-file help text.
2024-06-20 21:56:31 +10:00
Clément Foucault
ab0e6386fc Fix: EEVEE: Imprecision in HiZ gather coordinates
The offset was only 0.5 which centered the gather
sample exactly on the first pixel of the quad.
With floating point arithmetic differences on Nvidia
this lead to the wrong set of texture pixel being
fetched by gather.

Using the coordinate at the center of the quad fixes
the issue.

Fix #123262
2024-06-20 13:06:52 +02:00
Aras Pranckevicius
b76a95b8b4 Fix: VSE timeline strip outline readability
With selected strips, it is not clear where one of them begins and another
ends since their outlines are right next to each other.

This changes strip look so that:
- All strips have consistent dark 1pt outline at the outer edge.
- Selected strips have 2pt highlight inside said outer edge.
- Selected strips also have a 1pt wide 33% opacity darker line inside the
  selection highlight (and inside possible handles). To improve readability
  in case strip content happens to be similar to selection/active color.

Images in PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/123431
2024-06-20 13:01:26 +02:00
Luya Tshimbalanga
a9fe638972 Fix: Cycles runtime compile using outdated HIP parameters
This commit resolves an warning message.

Signed-off-by: Luya Tshimbalanga <luya@fedoraproject.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/118401
2024-06-20 12:43:27 +02:00
Bastien Montagne
32ece7d604 Fix (unreported) 'copy' version of MEM_cnew not handling alignment.
Almost certainly not an issue in current codebase (this 'copy' version
of `MEM_cnew` does not seem much used in the first place), but better be
consistent with the 'allocating' version.

Pull Request: https://projects.blender.org/blender/blender/pulls/123445
2024-06-20 11:00:34 +02:00
Bastien Montagne
461ee89b61 Cleanup: Sync 'alignment' checks of guarded allocator with lockfree one.
Sync a bit better the checks on the alignment value between
`MEM_lockfree_mallocN_aligned` and `MEM_guarded_mallocN_aligned`.

The only significant change, in `MEM_guarded_mallocN_aligned`, is the
usage of `ALIGNED_MALLOC_MINIMUM_ALIGNMENT` instead of 'magic value' `8`.
This should not have any effect on 64bits platforms, but on 32bits ones
the minimum alignment would be reduced from `8` to `4` now.

NOTE: we could also consider making these checks part of a utils
function, instead of duplicating them in the codebase.
2024-06-20 11:00:33 +02:00
de986e68d4 Cleanup: spelling and duplicates in local dictionary
Correct some misspellings in the custom spellcheck dictionary as well
as any instances of the previous spellings in code comments.

Ref !123459
2024-06-20 17:30:08 +10:00
Campbell Barton
801e47f42a Extensions: support "Install from Disk" for remote repositories
When installing from disk, include remote repositories in the list.

- Works with drag & drop from file system.
- This is the only way to "downgrade" an extensions.
2024-06-20 17:10:01 +10:00
Campbell Barton
e2522e5f03 Extensions: support displaying "Orphan" extensions
Extensions in remote repositories that have no remote entries (orphans)
are now listed in the UI and the "list" sub-command.

Required for installing into remote repositories from disk (see #122302)

Details:

- Consistent ordering (local, remote) arguments.
- Use zip(..., strict=True) when sequences are expected to be aligned.
2024-06-20 15:16:05 +10:00
Brecht Van Lommel
66652ae12e Cleanup: Fix outdated comments about library dependencies 2024-06-20 02:30:22 +02:00
Jesse Yurkovich
6c5ce883e7 Fix: USD access of deleted mesh during custom property write
We were accessing `mesh` but it's been deleted already.

Pull Request: https://projects.blender.org/blender/blender/pulls/123426
2024-06-19 21:44:59 +02:00
salipourto
0b20c28875 Cycles: HIP support for AMD Strix APUs
This required various compiler and SDK updates
* HIP on Windows updated to 5.7.3
* HIP on Linux updated to 6.3.1
* HIP-RT updated to version 2.0.e1ff193

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/123256
2024-06-19 20:54:04 +02:00
Clément Foucault
dea7620e0b Fix: EEVEE: Wrong format and barriers for AO 2024-06-19 20:25:49 +02:00
Brecht Van Lommel
20de5647e3 Build: Add /opt/rocm as hint for finding HIP compiler 2024-06-19 19:35:36 +02:00
Brecht Van Lommel
1dfa553822 Build: Use a different folder per architecture for "make deps"
To avoid accidentally trying to build different archs in the same
folder.
2024-06-19 19:02:39 +02:00
Miguel Pozo
02f6ea906e EEVEE: Update reference images for tests 2024-06-19 18:43:40 +02:00
Laurynas Duburas
9ae063d40b Fix #123325: Curve selection more does not highlight curves
Adds handles to curve types `CURVE_TYPE_CATMULL_ROM`,`CURVE_TYPE_POLY` to fix #123325.
Previously not shown as seemed redundant in `Control Point` edit mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/123373
2024-06-19 18:31:02 +02:00
Miguel Pozo
8fc614fc1b Fix: EEVEE: Use of scene before assignment
Move update_eval_members to the top of init to avoid future issues.
2024-06-19 18:15:27 +02:00
Brecht Van Lommel
da9f586748 Fix #104061: Python GPU module unusable after too early import
Add-ons may attempt to load the GPU module in background mode when no GPU
context has been initialized yet. This would give an error on import.

If then later the GPU context does get initialized, for example for a
render engine, import would still fail as the module is cached.

This reverts commit d7f124f06f3fda59523ed05f12d1f4af6a523ba6, and again
throws errors in methods and constructors instead of module import.

Pull Request: https://projects.blender.org/blender/blender/pulls/123395
2024-06-19 17:54:35 +02:00
Brecht Van Lommel
eaeb8ba8cd USD: Rename active UV Map to "st" by default
This was previously attempted in #109518 and reverted in #112234. Now do
both the changes in the mesh and material export, and make it an option
in USD export. Hydra always renamed to "st" and continues to do it.

Fix #122800: Missing textures with MaterialX materials

Pull Request: https://projects.blender.org/blender/blender/pulls/123326
2024-06-19 17:53:55 +02:00
Attila Áfra
dfd9f9066b Build: Upgrade OIDN to 2.3.0 final
This upgrades OIDN to the final 2.3.0 release.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/123433
2024-06-19 17:53:40 +02:00
Campbell Barton
da3461f8eb Fix #123241: Wrong dialog shown when dropping an unsupported package
Dropping an extension URL for an incompatible package displayed the
"Unknown Repository" dialog.

Resolve by detecting the case of an unknown package being dropped from
a known repository. Noting the package may not be compatible.
2024-06-19 20:47:55 +10:00
Jacques Lucke
934041e8d6 BLO: support overaligned types in SDNA
This fixes #121695. `float4x4` matrices are generally expected to be 16 byte aligned.
Currently, there is no mechanism (afaik) that allows allocating these overaligned types
when loading files from disk. This patch adds an array with alignment information for
 each type in `SDNA`. Currently, the alignment is just `__STDCPP_DEFAULT_NEW_ALIGNMENT__`
for all types and is manually set for the `mat4x4f` DNA type. The .blend file format is
not changed at all. The alignment information is purely runtime data.

In the future it would probably be good to generalize this a bit more instead of
hardcoding the alignment for `mat4x4f`, but would make it unnecessarily complex for
now because this is intended for the release branch.

Pull Request: https://projects.blender.org/blender/blender/pulls/123271
2024-06-19 12:16:24 +02:00
Jacques Lucke
1d4b4440d9 Curve: reduce overhead in debug builds 2024-06-19 12:08:27 +02:00
Aras Pranckevicius
7e61f14a88 Fix #123332: VSE strip transform handles look tweaks
Current look of VSE timeline view strip transformation handles makes them
somewhat "too narrow", especially after recent changes that made them
more narrow than before (handle tweaking feature) and a strip visual change
that made strip outline not go outside of strip bounds. They are now just
2px wide, effectively.

This changes their look as outlined in #123332 design task:
- The inset dark line is no longer over the handles, but rather "inside"
  of them (except when handles are semitransparent, i.e. for strips that
  are not selected).
- The handles themselves have rounded corners.

Pull Request: https://projects.blender.org/blender/blender/pulls/123391
2024-06-19 11:49:20 +02:00
Campbell Barton
50bb98fba5 Fix #123339: Blender fails to build with older versions of wayland
Follow up to [0] which only addressed one of the issues.

[0]: bc7cb481dab9d0f9c22d4c59e90930be9a3a6511
2024-06-19 19:36:10 +10:00
Damien Picard
2948b1e790 Give timeline marker default name when created via binding to camera
Timeline markers get a default name of "F_<frame>" when creating with
`marker.add`, but an empty name with `marker.camera_bind`.
Because the name of the current frame's marker is displayed in the
viewport statistics, such markers appear as "<>" after the name of the
active object, which is confusing.

This change gives the same default name of "F_<frame>" to markers
created this way.
It also cleans up a comment in the line copied from, as that line was
introduced in late 2008 so probably not so temporary.

Pull Request: https://projects.blender.org/blender/blender/pulls/122968
2024-06-19 11:22:28 +02:00
Jacques Lucke
ed357136dc Fix #123410: node frames interfere with node hide toggle
Now the `uiBlock` array for node is indexed with `node.index()` instead
of the draw-index which is not as readily available in some cases.
The main alternative would be to create an extra map from node index
to draw-index but that doesn't seem worth it right now.
2024-06-19 11:21:12 +02:00
Aras Pranckevicius
189410e1ff Fix #123333: VSE strip outline width now takes DPI/line width setting into account
Now the strip outline (1 point for unselected strips, 2 point outline +
1 pt dark inset) takes monitor DPI / user preference line width into
account, via the usual U.pixelsize machinery.

Pull Request: https://projects.blender.org/blender/blender/pulls/123369
2024-06-19 11:19:15 +02:00
Omar Emara
4329dafb4c Fix #123340: Zero division in Difference Key node
The Difference Key node suffered from zero division when the falloff is
zero. Fix that by using safe division.
2024-06-19 11:46:09 +03:00
Alaska
10737d719e Cleanup: Correct Cycles code comment
The code comment references a variable that was removed during the
review process of !123341

Pull Request: https://projects.blender.org/blender/blender/pulls/123409
2024-06-19 10:42:13 +02:00
Campbell Barton
6eb2b5f47b Fix local extension errors being shown as remote errors
Also fix error with non extension add-on display by removing
an exception for extensions which is no longer needed.
2024-06-19 15:58:45 +10:00
Hans Goudey
86e1ef2e31 Fix: Memory leak in purge orphans with no unused data-blocks
Operator cutom data was allocated but not freed in the early return.
2024-06-18 23:49:18 -04:00
Harley Acheson
ad625d8dc4 Fix #122423: Clear handlers for non-temporary regions on exit
Resolve regression in [0] which incorrectly replaced
`WM_event_modal_handler_region_replace` with
`WM_event_ui_handler_region_popup_replace`
causing a crash when accessing dangling pointers.

Resolve by restoring the call to clear modal handlers regions.

Ref !122922

[0]: b25eefbf9acb51df61bb264686d9da42d2499e18
2024-06-19 09:49:21 +10:00
Campbell Barton
0cc9762651 Cleanup: spelling in comments 2024-06-19 09:41:11 +10:00
Sean Kim
bf2e59e1dd Fix: Relax face set occasionally too strong
In a previous refactor, the iteration variable was shadowed resulting in
the extra strength always being applied.

Pull Request: https://projects.blender.org/blender/blender/pulls/123350
2024-06-18 21:49:35 +02:00
Sean Kim
7a16b9f04f Fix #123335: Expand Face Set behaves incorrectly on new mesh
Without the call to ensure_face_sets_mesh, the initial values of the
cache are 0, not 1. The latter is the correct default value to represent
no face set.

Pull Request: https://projects.blender.org/blender/blender/pulls/123392
2024-06-18 21:03:27 +02:00
Clément Foucault
ff03ab4d08 Fix: EEVEE: Overblur of textures because of TAA
This was a missing block of the TAA implementation.
TAA jitter and reprojection have a tedency to soften
the texture. Add a 1.5 bias to make them a bit sharper.

Note that this is a bit different than the usual TAA
blurring. In final render we don't do reprojection
so it is only because the texture filter (box filter
from the LOD) is applied at the same time than our pixel
filter (blackmann-harris). It is less noticeable than
the normal TAA blur, but still blurs ~2px instead of
1.5px.
2024-06-18 19:31:47 +02:00
Falk David
10b1e45ca8 Fix: Curves: Crash in transform code for non bézier curves
This caused a crash in grease pencil when trying to transform strokes (poly curves).
The code assumed that the left and right handle indices existed.

Pull Request: https://projects.blender.org/blender/blender/pulls/123311
2024-06-18 19:08:11 +02:00
Miguel Pozo
feed10a4c2 Fix: GPU: Workaround for validation errors on replaced passes 2024-06-18 18:36:09 +02:00