Commit Graph

137583 Commits

Author SHA1 Message Date
Omar Emara
30643fcf9b Fix: Bloom glare crashes when image is too small
The Bloom mode of the Glare node crashes if the input image is too
small. This is because bloom is computed using a down-sampling followed
by an up-sampling chain, and if the user supplied size is not maximum,
the computed chain length might be zero or negative, which is not
handled gracefully. To fix this, we just sanitize the chain length.

Pull Request: https://projects.blender.org/blender/blender/pulls/124089
2024-07-03 11:27:26 +02:00
Campbell Barton
463c05b341 Extensions: fix missing redraw after setting tags, report adding a repo
- Report when a repository is added since it's not so clear from the
  popup that a new repository has been added.
- Fix for missing redraw after selecting all/none tags.
- Also access the tags property once instead of getting it for each
  button.
2024-07-03 16:56:01 +10:00
Campbell Barton
e2b24904c9 Extensions: add buttons to select tags
This is for convenience since manually selecting all/none is tedious.
2024-07-03 15:55:20 +10:00
Jacques Lucke
edd1749e22 Fix #124049: object losing user count in geometry nodes modifier 2024-07-02 20:32:24 +02:00
Clément Foucault
8718aa5513 Fix: EEVEE: Film: Sub-optimal sampling at lower filter size
The `sample_disk` returns samples inside a disk of radius 1
which was spanning 2 pixels. The blackmann-haris filter has
not much energy at the edge of the filter and since we
don't importance sample the filter, we have very low weight
samples at some time steps. Improve this by biasing the
distribution towards the center.

This is a temporary solution until we have proper importance
sample of the filtering function for this case.

Fix #123630
2024-07-02 20:31:20 +02:00
Clément Foucault
04b460317a Fix: EEVEE: Missing diffuse indirect lighting
Cause by lightprobe volume cache size change.

This was missing a simple update tagging for
the world to be reuploaded.
2024-07-02 18:07:09 +02: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Campbell Barton
603b833fe3 Fix error accessing remote extension repositories via file:// on WIN32
Converting the URL back to a path left a slash before the drive letter.
2024-07-02 09:27:59 +10:00
John Kiril Swenson
8d8a84ffb4 VSE: Fix crashes adding freeze-frames to segments
If a freeze-frame retiming key was added to either a transition or
freeze-frame segment when the strip was selected, Blender would crash.
The issue is that `SEQ_retiming_add_key` returns `nullptr` if the start
key of the current segment is one of these types, and never bothers to
cancel the operation if this happens.

Instead, it only attempts to get a key at the current frame with
`SEQ_retiming_key_get_by_timeline_frame`. This is redundant, since there
are already checks to see if that key exists in `SEQ_retiming_add_key`.
Remove this code and move up the other `nullptr` check to fix the bug.

Pull Request: https://projects.blender.org/blender/blender/pulls/123981
2024-07-01 23:25:11 +02:00
John Kiril Swenson
4c8319a227 VSE: Fix retiming unallowed strip type crashes
Currently, many retiming operators are able to operate on all selected
strips. However, if strips that do not support retiming are selected
(e.g. color strips), attempting to perform these operations will crash
Blender. The operators are only polled away if the active strip does
not support retiming -- this is not resilient enough.

This patch fixes the issue by checking each strip to make sure it
supports retiming. Some of the operators do not necessarily crash
without this fix (`retiming_show`, `retiming_key_add`), but still benefit
from exiting early if the current strip does not permit the functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/123975
2024-07-01 23:19:44 +02:00
John Kiril Swenson
607445da5f VSE: Standardize reset retiming operator
Every retiming operator works on selected strips. However, the reset
retiming operator only works on the active strip.

This patch standardizes the behavior so that all selected strips have
their retiming reset. This gives more control to the user to reset
many strips' retiming in bulk.

Pull Request: https://projects.blender.org/blender/blender/pulls/123973
2024-07-01 23:12:52 +02:00
Richard Antalik
952f41a9fd Fix: VSE frame interpolation is broken
Caused by incorrect output of `SEQ_give_frame_index` for effect strips.
Also since output value is float, it has to be truncated to integer,
when image bufferes are rendered for the effect.

Pull Request: https://projects.blender.org/blender/blender/pulls/123914
2024-07-01 23:07:23 +02:00
Clément Foucault
beb8ec4fe1 Fix: EEVEE: Wrong subsurface sample distribution
The sample distribution was biased toward 0, which
created sharper details than expected.

However the downside is that the subsurface is now
more jittery because of the low amount of samples.
2024-07-01 19:55:01 +02:00
Jesse Yurkovich
2eec6a819e Fix: Add missing thin film parameters to MaterialX export
Wire up the new Principled BSDF thin-film inputs when building
MaterialX graphs.

Pull Request: https://projects.blender.org/blender/blender/pulls/123613
2024-07-01 19:08:56 +02:00
Miguel Pozo
4c314f9a78 GPU: Add --gpu-compilation-subprocesses cmd setting
Allow overriding the `max_parallel_compilations` from the command
line.
Disable compilation subprocesses on RenderDoc sessions.

Pull Request: https://projects.blender.org/blender/blender/pulls/123995
2024-07-01 16:36:01 +02:00
Miguel Pozo
2b248d2720 Fix #123207: EEVEE: Disable motion blur on camera change
Pull Request: https://projects.blender.org/blender/blender/pulls/123919
2024-07-01 15:47:10 +02:00
Campbell Barton
0255be9b22 Fix invalid repository paths from generated HTML
The "repository" in links from the generated HTML was only valid when
the URL did not contain a path component.
Resolve by supporting relative "repository".

This simplifies referencing the JSON from a generated HTML since
a relative link doesn't need to know the repositories absolute URL
to the destination.
2024-07-01 23:33:09 +10:00
Clément Foucault
d4774a219b Fix: EEVEE: Missing light tiles in light probes
This was caused by the light culling system not
allocating enough tiles to cover the sphere lightprobe
render target.

Taking the max size between the lightprobe target and
the film fixes the issue.

Fixes #117444
2024-07-01 15:04:53 +02:00
Campbell Barton
c2326a1639 Fix #123677: Incompatible extensions can be installed from disk 2024-07-01 22:57:38 +10:00
Campbell Barton
7bd846ce0a Fix error including platforms in extensions HTML output 2024-07-01 22:08:34 +10:00
Weizhen Huang
f2215d7564 Fix: safe_normalize() not defined for float2 on Metal 2024-07-01 13:58:30 +02:00
Alexander Brock
1b09654530 Fix and test direction_to_fisheye_lens_polynomial
The function direction_to_fisheye_lens_polynomial computes the inverse of
fisheye_lens_polynomial_to_direction.

Previously the function worked almost correctly if all parameters except k_0
and k_1 were zero (in that case it was correct except for flipping the x-axis).

I replaced the fixed-point iteration (?) by Newton's method and implemented a
test to make sure it works correctly with a wider range of parameter sets.

Pull Request: https://projects.blender.org/blender/blender/pulls/123737
2024-07-01 13:56:35 +02:00
Miguel Pozo
635db22ca6 Fix: Re-apply versioning made for EEVEE-Next in 4.1
Pull Request: https://projects.blender.org/blender/blender/pulls/123909
2024-07-01 13:37:48 +02:00
Omar Emara
e545c814a4 Fix: Scene not rendered even with Cryptomatte node
Blender doesn't render the scene even though a Cryptomatte node exists.
That's because Blender only considers Render Layer nodes, but
Cryptomatte node can reference scenes as well. This patch fixes that by
putting Cryptomatte nodes into consideration.

Pull Request: https://projects.blender.org/blender/blender/pulls/123814
2024-07-01 12:28:24 +02:00
Jeroen Bakker
9f53f3b600 OpenGL: Disable Stencil Export when forcing workarounds
When forcing workarounds the stencil export support wasn't disabled.
This PR disables stencil export support when forcing workarounds.

Pull Request: https://projects.blender.org/blender/blender/pulls/123985
2024-07-01 12:19:26 +02:00
Bastien Montagne
ec1836f66f I18N: Updated UI translations from git/weblate repository (44224d93ece6077). 2024-07-01 12:06:16 +02:00
Miguel Pozo
f16fdcfc85 Fix #123794: Crash when UDIMs have gray and color tiles
Don't use grayscale data for color UDIM arrays.

Pull Request: https://projects.blender.org/blender/blender/pulls/123905
2024-07-01 12:02:28 +02:00
Campbell Barton
78330522d2 Fix #123877: exception showing an add-on with an invalid manifest
Extensions with a manifest that can't be parsed caused can exception
in the add-ons UI.

Account for errors loading the manifest, falling back to dummy values
& show a warning that the exceptions manifest could not be parsed.
2024-07-01 17:20:38 +10:00
Campbell Barton
75f500ad02 Fix #123923: regression un-installing an extension
Regression in [0] which used an argument only available in Python 3.12.

[0]: 37ae9d5fc47e2842ee77a07482039d24a06784f9
2024-07-01 16:37:54 +10:00
Campbell Barton
789b7bba91 Fix #123938: error dragging extension URLs to install an extension
Regression in [0].

[0]: 989de85cf6311d8d6433d1fcda42bfeda1c1b320
2024-07-01 16:06:32 +10:00
Campbell Barton
0c54c347d8 Extensions: correct missing return
Harmless but mypy warns about this.
2024-07-01 15:57:42 +10:00