Commit Graph

138514 Commits

Author SHA1 Message Date
Omar Emara
39b47318e5 Compositor: Add warning about unsupported texture nodes
Add a warning to the compositor Texture node about the fact that texture
nodes are not supported.
2024-07-02 18:51:38 +03:00
Omar Emara
7dfc16141c Merge branch 'blender-v4.2-release' 2024-07-02 18:13:28 +03:00
Omar Emara
5a56a56435 Fix: Missing compositor texture node updates
The output of the Texture node in the compositor does not update when
the texture settings or the texture type is adjusted. That's because
texture evaluations are cached, and the cache is not invalidated when
needed.

This happens because we rely on the depsgraph to tag changes to textures
so that the cache is invalidated. The tagging doesn't happen because the
texture ID is actually not part of the depsgraph in some cases. This is
so because the Texture ID property in the node does not update depsgraph
relations when it changed, so the depsgraph is out of sync with the node
tree.

This patch fixes that by invoking a depsgraph relations updates when
ever an ID property used by the compositor is changed.

Pull Request: https://projects.blender.org/blender/blender/pulls/124050
2024-07-02 17:11:29 +02:00
Omar Emara
29451489ae Cleanup: Render: Restructure compositor render code
This patch cleanup and refactors the render pipeline compositor render
code to deduplicate code and clarify usage.

The unused this_scene arguemenet was removed, per-node functions were
introduced to simplify loops, C++ Set was used instead of GSet, and
scene change is now detected by any rendered scene in the set.

Pull Request: https://projects.blender.org/blender/blender/pulls/124028
2024-07-02 17:10:27 +02:00
Miguel Pozo
9f91ca66bc Merge branch 'blender-v4.2-release' 2024-07-02 17:09:04 +02:00
Miguel Pozo
9691ff004a Fix #122456: EEVEE: Reset history on volume updates
Pull Request: https://projects.blender.org/blender/blender/pulls/123916
2024-07-02 17:07:43 +02:00
Miguel Pozo
961dcf29ee Merge branch 'blender-v4.2-release' 2024-07-02 17:01:01 +02:00
Miguel Pozo
b0fbd550e0 Fix #124011: GPU: Broken specialization constants
Don't store pointers to `blender::Map` items since, unlike `std::map`,
they're not guaranteed to stay valid.
This resulted in shader binaries being loaded into the wrong
specialization.

Pull Request: https://projects.blender.org/blender/blender/pulls/124051
2024-07-02 16:59:22 +02:00
Bastien Montagne
6d68f82398 Merge branch 'blender-v4.2-release' 2024-07-02 16:52:15 +02:00
Brecht Van Lommel
f8e78b8236 Refactor: Move Linux/macOS harvest to individual files
More closely matching Windows and easier to update.

Pull Request: https://projects.blender.org/blender/blender/pulls/123196
2024-07-02 16:49:22 +02:00
Bastien Montagne
570eee1717 Debug: Add new userpref option to enforce recompute of ID usercount on filesave.
This is a workaround to allow user to keep working without loss of data
when an issue like #124049 happens.

This commit also expose again the `use_all_linked_data_direct` debug
option, no idea why that one was removed.
2024-07-02 16:46:19 +02:00
Clément Foucault
d8fef30b36 Fix: EEVEE: Broken object attributes on volume, pointcloud and curves
This was a simple oversight.

Also adding a version of `extract_object_attributes` for
single material object.

Fixes #123997
2024-07-02 16:41:12 +02:00
Sergey Sharybin
368143c4f2 Merge branch 'blender-v4.2-release' 2024-07-02 16:03:21 +02:00
Alaska
f3fb3a9ecd Cycles: Update device entries more often
This resolves two issues:
1. On macOS the GPU Compute device would be disabled by default unless
the user opens user preferences. This is unexpected behaviour ever
since 09ba1486f8224
2. Fixes incorrect automatic denoiser display settings and errors in
terminal related to the denoising UI on macOS if the user hasn't opened
user preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/123911
2024-07-02 16:02:53 +02:00
Sergey Sharybin
de6037c43d Merge branch 'blender-v4.2-release' 2024-07-02 15:59:33 +02:00
Jeroen Bakker
4394b87012 Vulkan: Add support for barycentric coordinates
Barycentric coordinates are used for the wireframe shader. It was
already implemented, but was made broken or when we change the depth
range or when we added support for fallback of shader viewport/layer
rendering. The previous implementation didn't use the correct
EmitVertex leading to incorrect depths. Also the shader layouts where
not Vulkan compliant.

![image](/attachments/39fbfd9e-16fd-42d8-9520-3d8fa839e7de)

Pull Request: https://projects.blender.org/blender/blender/pulls/124048
2024-07-02 15:59:16 +02:00
Alaska
4961b93136 Cycles: Fix crash using OptiX denoiser with unsupported device selected
Fixes an issue where Blender would crash if the OptiX denoiser was
selected, but an unsupported GPU device (E.g. Intel GPU) was
selected in preferences.

This crash would occur because Cycles uses the device in preferences
to setup the denoiser, and there was no check stopping an unsupported
GPU from being used to try and setup and run the denoiser.

Pull Request: https://projects.blender.org/blender/blender/pulls/124001
2024-07-02 15:58:56 +02:00
Iliya Katueshenock
3f6d9fa00d Fix #123971: Geometry Nodes: Offset Point in Curve incorrect result
There is was UB due to using of mapped vertex index as index of
offset instead of do read offsets and indices in the same way.

Pull Request: https://projects.blender.org/blender/blender/pulls/124035
2024-07-02 15:50:31 +02:00
Hans Goudey
c6bdeebf9a Sculpt: Data oriented refactor for rotate brush
Part of #118145.
A straightforward brush implementation, with just a fairly simple
custom loop to calculate the translations.
2024-07-02 09:35:27 -04:00
Hans Goudey
5b228efb9b Cleanup: Sculpt: Remove unused logic in clay thumb brush
Since the initial commit (015d5eda884dfb10f898) the interpolation
from the "back" plane has been unused. Since it's been this way for
three years, I will assume this is the way it's mean to work and clean
up the code while keeping the behavior unchanged.
2024-07-02 09:35:27 -04:00
Hans Goudey
93f38eaa9d Sculpt: Data oriented refactor for clay thumb brush
Part of #118145.
Since the initial commit (015d5eda884dfb10f898) there has been a logic
mistake in the code for this brush where a variable was unused. The code
has worked for years in that state, so I left it in. The next commit
will clean up the unused code.
2024-07-02 09:35:26 -04:00
Hans Goudey
ee73b4f978 Sculpt: Data oriented refactor for thumb brush
Part of #118145.
This implementation is quite simple, it's similar to the draw
brush and the draw sharp brush, but it also restores from the
original positions on each update step.
2024-07-02 09:35:26 -04:00
Simon Thommes
6ee9641e5c Update asset repository
Ref: https://projects.blender.org/blender/blender-assets/pulls/8
2024-07-02 15:10:49 +02:00
Jeroen Bakker
88f04e95c3 Vulkan: Fix HiZ synchronization
HiZ update performs a read/write on different buffers, this lead
to write-after-write hazards as the resources where added multiple
times in the same pipeline barrier with different access masks.
This is fixed by merging pipeline barriers based on their resource.

Pull Request: https://projects.blender.org/blender/blender/pulls/124036
2024-07-02 14:06:49 +02:00
Jeroen Bakker
bf3c6a3480 Vulkan: Improve debugging render graph
Adds debug print function to output a node with its inputs and outputs.
Also keep track of the name of the resource (only images) what will
be presented. Tracking of the resource name is only done in debug builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/124033
2024-07-02 13:29:34 +02:00
Nathan Vegdahl
953b319ea8 Fix #123961: "Only Insert Needed" flag keys objects incorrectly
The root cause was some code that tries to omit keying loc, rot, or
scale based on the current transform mode and pivot type. The idea is
sound, but for it to work properly it also needs to know if more than
one object is being transformed or not. Notably, this bug affected the
scale transform mode as well, not just the rotation transform mode as
reported in #123961.

This fixes the issue by passing a flag down that informs that code
whether more than one object is being transformed, and using that flag
to correctly omit loc/rot/scale when possible.

PR #123998

Pull Request: https://projects.blender.org/blender/blender/pulls/123998
2024-07-02 10:52:24 +02:00
Nathan Vegdahl
e3b125f02b RNA: implement equality operator for RNAPath
Among other things, this enables using various methods on a collection
of `RNAPath`s (e.g. `Vector<RNAPath>`) that depend on the equality
operator being implemented.

The specific implementation and semantics used are based on a review
from and discussion with Bastien Montagne (mont29).

PR #123998
2024-07-02 10:52:22 +02:00
Bastien Montagne
365a3da148 Fix RNA 'property iterator' code wrongly skipping some custom properties.
`rna_idproperty_known` would systematically skip IDProperties if their
identifier matched the identifier of an RNA property.

This should only be done in case the RNA property is
'dynamically-defined', i.e. it uses IDProperties as storage backend, and
has the `PROP_IDPROPERTY` flag set.

This will fix #123983, among probably many other similar hidden
failures.

NOTE: I would call that fix too risky for Blender 4.2 at this point of
the release. This is a very low-level change, it's fairly hard to foresee
all of its possible side effects.

Pull Request: https://projects.blender.org/blender/blender/pulls/124000
2024-07-02 10:37:43 +02:00
Jeroen Bakker
459b4c7f00 Vulkan: Fix Point rendering in UI (Curves)
`ui_draw_but_CURVE` used a flat color shader to draw points. This
isn't valid as that shader doesn't support point rendering.

This is fixed to replace the `GPU_SHADER_3D_FLAT_COLOR` with
`GPU_SHADER_3D_POINT_VARYING_SIZE_VARYING_COLOR`.

Regression found when loading `monster.blend` using Vulkan. This
scene has the color management tab open with a custom curve.

Pull Request: https://projects.blender.org/blender/blender/pulls/124025
2024-07-02 09:43:57 +02:00
Nathan Vegdahl
2e505b76a4 Anim: add a method to Action that ensures a Binding exists for an ID
This PR also uses the new method in the one place I'm currently aware of that
needs it.

The reason to split this out into its own method is that it's coming up again in
upcoming PRs that handle smaller corner cases in the Baklava keyframing code. So
this centralizes the 'ensure binding' logic in one place so it's handled
consistently everywhere.

Since this is a small PR, I've also taken the opportunity to do some minor
cleanup of the affected areas of the keyframing code while I was there anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/123988
2024-07-02 09:40:40 +02:00
Jeroen Bakker
7fcc4e5374 Vulkan: Add Render graph support to VKDrawList
Resources of the draw list were overwritten, before used. Fixed by
using resource tracking.

Pull Request: https://projects.blender.org/blender/blender/pulls/124024
2024-07-02 09:20:34 +02:00
Campbell Barton
9103f9682d Merge branch 'blender-v4.2-release' 2024-07-02 17:06:40 +10:00
Campbell Barton
dffc47e6cf Merge branch 'blender-v4.2-release' 2024-07-02 17:06:35 +10:00
Campbell Barton
df6ba6d324 Fix unhandled exception refreshing outdated extensions
Changes the the extension repositories in the preferences while
update notifications were running could raise an exception.

Resolve by only calculating outdated extensions for
repositories that still exist.
2024-07-02 17:04:53 +10:00
Jeroen Bakker
4d0c14bed3 OpenGL: Fix read from uninitialized memory
When performing framebuffer transition on legacy opengl platforms, some
state was uninitialized. Resulting in incorrect behavior and crashes.

Note that this doens't fix the black cube on legacy platforms. With this PR we
might be able to reproduce the issue on modern HW.

Pull Request: https://projects.blender.org/blender/blender/pulls/123989
2024-07-02 08:37:50 +02:00
Campbell Barton
e3d0997065 Merge branch 'blender-v4.2-release' 2024-07-02 16:19:45 +10:00
Andrej730
1f0592b3b1 Docs: corrections to bpy.utils.register_tool
- Replaced `tool` argument with `tool_cls`.
- Removed `space_type` argument that's not present in the method.

Ref: !118900
2024-07-02 16:18:08 +10:00
Campbell Barton
83ce50f2b8 Merge branch 'blender-v4.2-release' 2024-07-02 16:09:45 +10:00
Thomas Barlow
d1cff7974a Fix #108254: Infinite loop in rna_info.BuildRNAInfo(..)
When a registered class has a non-registered superclass,
rna_info.BuildRNAInfo entered an eternal loop.

The while loop in `rna_info.get_py_class_from_rna` was not mutating the
variables within the loop nor the variable in its condition, meaning it
would loop infinitely if the loop didn't exit in its first iteration.

When yielding registered classes in `subclasses_recurse`, the function
was erroneously checking if the class' superclass was registered rather
than checking the class itself, causing registered classes to be skipped
if their superclass was not also registered. If the class to be found
was skipped, the while loop would not exit in its first iteration and
would thus loop infinitely.

The while loop has been modified to iterate through each base rna type
until there is no further base type.

The `subclasses_recurse` function now correctly checks whether the
subclass is registered, not its superclass, when determining if the
subclass should be yielded.

Besides the fix, no functional changes are expected, the generated
Python API docs remain unchanged.

Ref: !108256
2024-07-02 16:03:26 +10:00
Campbell Barton
d97b7f4cd6 Merge branch 'blender-v4.2-release' 2024-07-02 15:23:11 +10:00
Campbell Barton
1322daa480 Extensions: clear search and tags when showing updates
Search and tags could prevent extensions from being displayed.
2024-07-02 15:20:25 +10:00
Campbell Barton
11b32ed48b Merge branch 'blender-v4.2-release' 2024-07-02 15:07:17 +10:00
Campbell Barton
c29d8326e0 UI: sort add-ons by name
Previously add-ons were sorted by category & name, remove the category
only sorting by name since the category is no longer displayed and
isn't part of extension meta-data. Now the add-ons are sorted by name
(case insensitive).

Details:

- Store add-ons modules sorted to avoid having to sort on every redraw.
- addon_utils.modules() now returns an iterator.
2024-07-02 15:06:14 +10:00
Campbell Barton
ebe5860027 Merge branch 'blender-v4.2-release' 2024-07-02 13:34:38 +10:00
Guillermo Venegas
262c68512f Fix #123807: layout panels can't be collapsed on scaled regions
In `ui_popup_block_position` popup blocks are scaled with the owner
button region scale which wasn't being done for layout panel bounds.

This applies the scale applied to the popup block to layout panels
bodies and headers.

Also when calculating layout-panels headers and bodies the offset
`layout_panel_y_offset` is applied in place, this because this value
can also be affected by this scale.

This solves the original issue described in #122411 and reverts the
regression #123807.

Ref !123980
2024-07-02 13:32:18 +10:00
Campbell Barton
3b420a5a79 Merge branch 'blender-v4.2-release' 2024-07-02 12:56:02 +10:00
Campbell Barton
33fb83ae74 Fix using network shares for extensions on WIN32
- Support UNC paths.
- Normalize URL's to account for differences between browsers.
2024-07-02 12:53:00 +10:00
Campbell Barton
170325744d Merge branch 'blender-v4.2-release' 2024-07-02 11:46:36 +10:00
Campbell Barton
e8a3537ffb Extensions: improve automatic repo names for file:// repos on WIN32
- Skip leading slash from drive letters.
- Use back-slashes.

While these weren't exactly bugs, it seemed like an error when the
path name wasn't what users would expect. Relates to #123994.
2024-07-02 11:45:39 +10:00
Hans Goudey
5bf9fc632b Sculpt: Data oriented refactor for multi-plane scrape brush, part 1
Part of #118145.
This only addresses the deformation part of the brush, the sampling of
the plane normals will be addressed separately. Generally this is a
somewhat strange brush compared to the others, so the order of
utility function calls is slightly different.

Pull Request: https://projects.blender.org/blender/blender/pulls/124018
2024-07-02 03:13:30 +02:00