Commit Graph

137608 Commits

Author SHA1 Message Date
Damien Picard
6a52c76a65 I18n: Translate messages in extensions, operator descriptions, Node Wrangler
- Operator descriptions use tip_() since they will be displayed in
  tooltips.

- Extension messages:
  - Split "(Add-on|Theme) \"{:s}\" already installed!" into two
    messages.
  - Use rpt_() to translate error messages.

- Restore core add-on name and description translation.

- Use DATA_ to translate paint material slot name, so that translation
  happens only if the user enabled it for user-created data.

- Node Wrangler contains functions used to build operators' poll
  methods. This change allows them to be properly translated by using
  str.format() instead of f-strings, and explicit extraction with
  tip_().

Pull Request: https://projects.blender.org/blender/blender/pulls/123795
2024-07-04 10:49:52 +02:00
Aras Pranckevicius
2aee84a611 Fix #123579: VSE, no magenta preview for missing scene strips
Code that implemented "show missing media in magenta" in VSE preview
only implemented that for images and movies, and forgot that scene
strips can also be missing.

Pull Request: https://projects.blender.org/blender/blender/pulls/124124
2024-07-04 10:27:52 +02:00
Nathan Vegdahl
b31d34033a Fix: make auto-keying reliably key all needed bone channels
This is a follow-up to #123998 which fixed autokeying on objects when
the "Only Insert Needed" user preference was enabled. This fixes an
essentially identical bug for auto-keying bones, but *also* fixes a
different-but-related bug unique to bone keying.

In the first bug the location channel would erroneously not get keyed
sometimes when the "Only Insert Needed" user preference was enabled.
This fixes that by passing in whether more than one bone is being keyed
or not, and using that to accurately determine if location actually
needs to be keyed.

In the second bug, the location channel would erroneously not get keyed
when "Auto IK" was used to transform bones. This fixes that by just
being over-conservative. This unforunately leads to more bones getting
their location channel keyed than needed when Auto IK is used, but this
is better than *failing* to key needed channels, which was the previous
behavior. I left a comment explaining the situation, along with a TODO
to address this in a more satisfying way in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/124054
2024-07-04 10:18:32 +02:00
Julien Duroure
8bf4d3c33f glTF exporter: Fix #124072 - avoid crash exporting empty collection at center 2024-07-04 08:57:27 +02:00
Julien Duroure
69390e970f glTF exporter: avoid crash copying props 2024-07-04 08:50:48 +02:00
Christoph Lendenfeld
8ecccddf1c Fix: Bone wire width not working with curve objects
The issue was that the wire width was not passed to the shader
when the object was of type curve.
This resulted in the bone wire thicker than expected and
not responding to the parameter.

Pull Request: https://projects.blender.org/blender/blender/pulls/124053
2024-07-04 08:40:52 +02:00
Harley Acheson
508d08c687 Revert "Fix #122808: Better Indication of Missing VFont"
This reverts commit ff89e24bf5de8db9a5119a696789d154beb6f943.
2024-07-03 20:35:46 -07:00
Campbell Barton
c55ae88148 Fix #123954: string attributes don't work with BMesh
RNA accessors were ignoring MStringProperty::s_len and assumed UTF8
encoding which is not the case. Use byte strings and get/set the length
member.
2024-07-04 12:29:59 +10:00
Campbell Barton
e3457bccbf Extensions: sub-commands "build" & "validate" validate manifest tags
Enforce tags from extensions.blender.org with support for using an
alternate set of tags (for other repositories), or no tag validation
at all if the repositories choose not to enforce this.

- By default building & validating an extensions fails when unknown
  tags are used.

- The option `--valid-tags`` has been added which can either:

  - Reference a JSON file which lists valid tags per extension type.
  - Pass in an empty string to disable tag validation.

Default to constraining packages to use Blender's official tags as every
extension defining their own tags is likely to result in many similar
tags & a bad user experience. Details in code-comments.

Implements #123986.
2024-07-04 11:56:07 +10:00
Harley Acheson
ff89e24bf5 Fix #122808: Better Indication of Missing VFont
For text objects, current code will use another font if you ask for
a character that is not found in the selected font. But what if the
selected font is invalid? This can happen with a saved Blend that uses
a non-packed font that is since deleted. Current behavior will show
nothing. This PR restores earlier behavior where we use the built-in
font in this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/122851
2024-07-04 03:26:22 +02:00
Jesse Yurkovich
4806078dbd Fix: USD: Use correct property names in RNA update callback
Use the correct property names in the up and forward axis update
callbacks. Otherwise they don't work as intended and the following will
be traced to the console:
```
RNA_enum_get: WM_OT_usd_export.forward_axis not found.
RNA_enum_get: WM_OT_usd_export.up_axis not found.
```

Pull Request: https://projects.blender.org/blender/blender/pulls/124112
2024-07-04 02:03:27 +02:00
Michael Kowalski
94c184d2a7 USD: custom properties export improvements
Added a new custom_properties_namespace USD export option, to
allow replacing or omitting the current default "userProperties"
namespace prefix.

Note that this option does not apply to names that already have a prefix
(e.g., it would apply to name "bar" but not "foo:bar").  It also does not apply
to the  internal Blender "object_name" and "data_name" properties which
always have the prefix "userProperties:blender".

Also added logic to handle ":" namespace delimiters in property names.

Pull Request: https://projects.blender.org/blender/blender/pulls/124067
2024-07-04 00:45:30 +02:00
Jesse Yurkovich
e9ba414799 Fix #124103: Build error when using WITH_USD but not WITH_HYDRA
Move a few functions to a common location so that they're all accessible
from both USD and Hydra.

Pull Request: https://projects.blender.org/blender/blender/pulls/124119
2024-07-03 22:02:53 +02:00
Clément Foucault
71159872a4 Fix: EEVEE: VDB renders as bounding box when using Volume Scatter
Use the same approach as Cycles and only render the volume
objects if the shader is using any attribute.

Fix #124061
2024-07-03 16:27:08 +02:00
Alaska
659e19607d Cycles: Cleanup calls to _cycles.available_devices
Refactor the call to `_cycles.available_devices` into it's own function
and update `self.device` at the same time to avoid mis-matches between
`_cycles.available_devices` and `self.device`.

Pull Request: https://projects.blender.org/blender/blender/pulls/124079
2024-07-03 16:00:42 +02:00
Alaska
090fed06a9 Cycles: Fix automatic OptiX denoiser section criteria
Only select OptiX as the automatic denoiser if an OptiX
device is selected in preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/124032
2024-07-03 16:00:02 +02:00
Clément Foucault
e10dcc01bd Fix: EEVEE: Avoid loosing SSS small radius energy
This was caused by the effective radius of some
components were below the first sample radius.
This meant that the accumulation resulted in zero
weight for these components.

This patch introduce a minimum radius that can
be represented depending on the sample closest
to the center pixel. This makes sure that we
have at least one sample that will have
non-zero weight.

Fix #124031
2024-07-03 15:09:19 +02:00
Aras Pranckevicius
44510662e9 Fix #123541: VSE thumbnails in some cases are drawn outside of the strip
Code was using seq->start + seq->len to figure out where the "right
side of content" is, seemingly since forever (i.e. since 997b5fe4
added strip thumbnails). But that is incorrect starting with 3.3,
where seq->len is "number of frames / samples in source media",
but that does not necessarily match number of frames in the timeline.
For movies this happens when media framerate does not match
sequencer framerate.

Use SEQ_time_content_end_frame_get instead to calculate where the
content ends.

Pull Request: https://projects.blender.org/blender/blender/pulls/124081
2024-07-03 14:59:07 +02:00
Sergey Sharybin
9460dfd4f3 Fix #124086: blake2 hasher is unavailable on macOS
The issue is caused by an external dependency to
/opt/homebrew/opt/libb2/lib/libb2.1.dylib

This change adds a test to catch the same issue in the future,
and moves the arm64 libraries to a newer hash with fixed Python.

Pull Request: https://projects.blender.org/blender/blender/pulls/124096
2024-07-03 14:46:33 +02:00
Clément Foucault
4d2fcc5716 Fix: EEVEE: Avoid assert from empty volume object material
Also avoid drawing them at all if the material has no
volume shader.
2024-07-03 14:40:54 +02:00
Alaska
1e6161759e Fix #124073: Incorrect material shadow mode versioning
Only apply EEVEE-Next material shadow versioning to materials with
surfaces. Otherwise this will break the rendering of some materials
(E.g. Volumetrics) by making the surface opaque to the camera.

Pull Request: https://projects.blender.org/blender/blender/pulls/124076
2024-07-03 14:23:40 +02:00
Nikita Sirgienko
74c09b2e63 Cycles: oneAPI: Fix undefined behavior when embree fails initializing
Embree device pointer can end up being nullptr even when Embree on GPU is
expected to be used.  Previous implementation overlooked this possibility,
leading to a completely silent fallback to the non-Hardware ray-tracing path,
this commit fixes it.  We've noticed this as now Embree relies on a driver
component: https://github.com/intel/level-zero-raytracing-support that can
potentially be missing from a system.

Pull Request: https://projects.blender.org/blender/blender/pulls/124085
2024-07-03 14:13:01 +02:00
Xavier Hallade
4477641467 Cycles: oneAPI: Fix driver version check for future Intel GPU drivers
SYCL runtime currently relies on an internal driver behavior that will
break the driver version string returned by SYCL if it changes:
https://github.com/oneapi-src/unified-runtime/issues/1777
This will be fixed at SYCL runtime level but until we use a new enough
one, we need to add additional verifications to avoid blocking execution
on a driver that will change this internal behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/124084
2024-07-03 14:12:16 +02:00
Philipp Oeser
cbbeeccd08 Fix #124027: EEVEE light influence UI disappears when light is pinned
As desribed in #90039, we dont have a context object when pinning data,
this was accessed though leading to python errors.

The object was only used for the active state of certain layouts, do to
resolve the errors (and disappearing UI), check if we actually get an
object from context. That means the correct active state of certain
layouts is lost (it could either be always ON or always OFF, PR is using
the former -- since the default visibility is ON, so that would be more
common).

Pull Request: https://projects.blender.org/blender/blender/pulls/124091
2024-07-03 13:43:39 +02:00
Omar Emara
81e4fa29b8 Compositor: Allow Glare node size below 6
This patch allows the size of the Glare node to be below 6. This is not
really a fix, but it is targeting the release branch because of concerns
about this limitation which din't exist for old EEVEE bloom.

Pull Request: https://projects.blender.org/blender/blender/pulls/124092
2024-07-03 12:30:42 +02:00
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