Commit Graph

137870 Commits

Author SHA1 Message Date
Dalai Felinto 2d2ebead32 Templates: Blender Manifest template
Pull Request: https://projects.blender.org/blender/blender/pulls/125668
2024-08-07 15:11:00 +02:00
Dalai Felinto 2be7442332 Templates: Remove bl_info from addon_add_object 2024-08-07 15:10:06 +02:00
Sean Kim 025735cef7 Fix #125375: Sculpt undo with duplicate object causes crash
Introduced with d527e3a6bd.

Cached values are tagged as dirty during the update step, this can cause
conflicts where we attempt to then flush then changes into the PBVH but
have not yet updated the mesh pointers and reinitialized them.

This commit forcibly initializes the underlying data to prevent such
cases from happening when flushing to the PBVH.

---

Original PR: https://projects.blender.org/blender/blender/pulls/125396

Pull Request: https://projects.blender.org/blender/blender/pulls/126020
2024-08-07 11:15:56 +02:00
Campbell Barton 3bfa5a0f70 Fix #125353: Select by active material fails to select the active slot
When (de)selecting the active material, use the active slot
falling back to the first-used slot (for non-active objects).

Resolve regression in [0].

Ref !125948

[0]: 296d05060d

Pull Request: https://projects.blender.org/blender/blender/pulls/125981
2024-08-06 19:04:28 +02:00
Christoph Lendenfeld b8859fa183 Fix: Dope Sheet drawing doesn't draw connecting line outside of viewport
The issue was caused by blender/blender@f3b393a74a
Before that commit, the keylist would be built including 1 keyframe
outside the range on each side (if there was one).
After that those would be ignored, leading to the following issue

Fixes #125861

The fix is to ensure the keylist is built with 1 key outside the given range.

Pull Request: https://projects.blender.org/blender/blender/pulls/125807
2024-08-06 19:04:22 +02:00
Christoph Lendenfeld d1f461afaa Fix #124585: Assert when building keylist for dope sheet
The issue occurred when creating a keylist for an FCurve.
Keys outside the given range are ignored, but the call to `update_keyblocks`
still got the full range leading to the assertion.
The fix is to keep track of the index range for which bezt have been added
to the keycolumns. Note that we have to do that within the loop because
the FCurve might not be ordered (e.g. during transforms in the dope sheet)

Pull Request: https://projects.blender.org/blender/blender/pulls/125678
2024-08-06 19:04:22 +02:00
Jesse Yurkovich 27c4d02635 Fix #125826: Crash when using Render Engine Procedural with PointClouds
In 4.2, Alembic points are imported as PointCloud objects instead of as
mesh vertices.

The code inside Mesh Sequence Cache which converts geometry into a
bounding-box mesh when using Render Procedurals needed to be updated
to support PointCloud objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/125846
2024-08-06 19:04:22 +02:00
Campbell Barton c5df790980 Extensions: use wait cursor when toggling add-ons
Add-ons with large wheels can take a while to extract,
set the wait cursor so it's clear Blender is busy.
2024-08-06 19:04:22 +02:00
Clément Foucault 15322b8f95 Fix: EEVEE: Invalid error in console from material preview
This was visible on apple hardware as it seems the data
from the SSBOs are not cleared.


Candidate for backporting to 4.2
2024-08-06 19:04:22 +02:00
Miguel Pozo 19f8e5d67d Fix #122454: EEVEE : Volumes don't render on Nvidia sometimes
The issue happens due to `out_phase_img` returning wrong values in `eevee_surf_volume_frag.glsl`.
The only workaround I've been able to find is using the same format as the other property textures.

Pull Request: https://projects.blender.org/blender/blender/pulls/125715
2024-08-06 19:04:22 +02:00
Jacques Lucke 917b5e81a5 Fix #124702: crash when pasting material 2024-08-06 19:04:22 +02:00
Julian Eisel 5f102ad445 Fix #123327: Crash when operator with properties opens render window
Essentially, the issue is that the Adjust Last Operation popup is
created in the new image editor window, before region polling was
executed for the new window. This region polling must be done first
because it can affect which regions are visible, and the
`ARegionType.on_poll_success()` callback may do additional set up.

Now make sure that region polling is always executed when a screen is
prepared for display, as part of the screen "refresh" code.

Note that the region polling is used for the asset shelf regions, which
are supported in the image editor since c60a1006e5.

Pull Request: https://projects.blender.org/blender/blender/pulls/123385
2024-08-06 19:04:22 +02:00
Campbell Barton b38439db99 Fix #77837: Error removing addons/extension/wheels on WIN32
When deleting files on WIN32, open files cannot be removed.
This is especially a problem for compiled Python modules which
remain open once imported.

Previously it was not as common for add-ons to include compiled Python
modules however with extensions supporting Python-wheels,
it's increasingly likely users run into this.

Workaround the problem by:
- Scheduling the files for removal next time Blender starts.
- Rename paths that cannot be removed to avoid collisions when
  the paths is reused (re-installing for example).

This is supported for:
- Extensions.
- Python wheels.
- Legacy user add-ons.
- App-templates.

Details:
- On startup, a file exists that indicates cleanup is needed.
  In the common case the file doesn't exist.
  Otherwise module paths are scanned for files to remove.
- Since errors resolving paths to remove could result in user data loss,
  ensure the paths are always within the (extension/addon/app-template)
  directory.
- File locking isn't used, if multiple Blender instances start at the
  same time and try to remove the same files, this won't cause errors.
  Even so, remove the checking file immediately avoid unnecessary
  file-system access overhead for other Blender instances.

Also resolves #125049.
2024-08-06 19:04:22 +02:00
Campbell Barton 2037ced2f3 Fix error installing app-templates & legacy add-ons overwriting symlinks
Resolve error when overwriting existing Python modules would attempt
to recursively remove a symlink which raised an error.

Related to #123827, same error but for extensions.
2024-08-06 19:04:22 +02:00
Campbell Barton 6288cd3ce7 Extensions: restore fix for removing extensions with symlinks
Regression from [0], removed the fix for #123827.

[0]: 08b75549e3
2024-08-06 19:04:22 +02:00
Alaska cc4c816e56 Fix #125750: NaN on Glossy materials with low roughness
Fix a NaN when rendering glossy materials that can appear due to a
division by zero in bsdf_D when rendering materials with low roughness.

Thank you to Weizhen for the fix after my incorrect
first attempt.

Pull Request: https://projects.blender.org/blender/blender/pulls/125756
2024-08-06 19:04:22 +02:00
Miguel Pozo 6d3d410b94 Fix #125185: Weight Paint Overlay doesn't work with EEVEE-Next
Use less or equal depth comparison for EEVEE and Overlay, since their
depths no longer match.
The main disadvantage of this approach is that material masked
transparency won't work anymore with overlays, so there's still another
(arguably not as bad) regression.

Pull Request: https://projects.blender.org/blender/blender/pulls/125722
2024-08-06 19:04:22 +02:00
Christoph Lendenfeld e6acfd25da Fix #125542: Bone Stick selection color is not drawn
Caused by blender/blender@ef8f14f3d6

That commit removed too much code.  We still need the condition
for editbones and their selected tips.
The fix is to bring back that check and set the tail color accordingly.

Pull Request: https://projects.blender.org/blender/blender/pulls/125764
2024-08-06 19:04:22 +02:00
Christoph Lendenfeld f20c962666 Fix #125509: Reordering of channels doesn't work in Graph Editor
The reordering of channels didn't work in the following case:
* in the Graph Editor
* Channels outside of a FCurve group

The reason for that was that any channels outside a group get added to a temp group
(sorting somehow depends on groups) and that was missing the `AGRP_EXPANDED_G`
flag. The reason this was only broken in the Graph Editor was that this flag is only used
for the graph editor. The `EXPANDED_AGRP` macro has a special case for that
(used towards the end of `rearrange_action_channels`).

Pull Request: https://projects.blender.org/blender/blender/pulls/125673
2024-08-06 19:04:22 +02:00
Omar Emara 4156520c2a Fix #125232: EEVEE writes wrong Cryptomatte meta data
EEVEE writes wrong Cryptomatte meta data layer name. The view layer name
is always prepended to the Cryptomatte layer name, which can cause the
view layer name to be duplicated or the existence of view layer name
where it shouldn't be.

Old: cryptomatte/{hash}/name: string 'ViewLayer.ViewLayer.CryptoObject'
New: cryptomatte/{hash}/name: string 'ViewLayer.CryptoObject'

Pull Request: https://projects.blender.org/blender/blender/pulls/125515
2024-08-06 19:04:22 +02:00
Miguel Pozo 76ac9c9684 Fix #125672: Mesh Analysis overlay crash
Null-check the result of `BKE_bvhtree_from_mesh_get`.

Pull Request: https://projects.blender.org/blender/blender/pulls/125725
2024-08-06 19:04:22 +02:00
Campbell Barton dd0be27783 Fix error where upgrading an extension always enabled it
Upgrading disabled extensions should never enable them.
2024-08-06 19:04:22 +02:00
Campbell Barton cb7cebe4d8 PyAPI: add bpy.app.python_args, use when calling Python from Blender
Expose arguments to use when creating a Python sub-process.

Python could fail to start when loaded in a customized environment,
with PYTHONPATH set for e.g. Blender ignores these and loads but a
Python sub-process attempts to use these environment variables which
may point to incompatible Python versions.

Resolve the root cause of #124731.
2024-08-06 19:04:22 +02:00
Campbell Barton 6cb5d6e969 PyAPI: include bpy.utils.extension_path_user in __all__
This wasn't being included in generated docs.
2024-08-06 19:04:22 +02:00
Miguel Pozo c6b358fda2 Fix #125387: Cycles Material Panel shows EEVEE Legacy settings
Update `draw_material_settings` to show EEVEE Next properties.
This only changes the internal function, instead of the Panel classes
themselves, to avoid breaking the Python API.

Pull Request: https://projects.blender.org/blender/blender/pulls/125616
2024-08-06 19:04:22 +02:00
Sybren A. Stüvel 2b9853c441 Fix #125226: Anim: Rigify limbs.spline_tentacle doesn't generate correctly
A template string was accidentally turned into an f-string in
78b9218c98, which changes the way it is
evaluated. Easy enough to roll back that one change.
2024-08-06 19:04:22 +02:00
Campbell Barton 381cb736e8 Fix #125660: Extensions fail to sync HTTPS repositories on WIN32
Workaround: `[ASN1] nested asn1 error` error when making HTTPS
connections on systems with certificates that OpenSSL cannot parse
are installed.

This is a general issue with Python, resolve by applying a proposed
fix [0] to the extensions Python process at run-time.
(this doesn't impact Blender's Python run-time).

The down side is HTTPS connections will only work for extensions
on systems with this problem so this needs to be resolved by Python
long term.

While any changes to Python's SSL checks is worth avoiding,
this simply skips SSL certificates in the windows store that OpenSSL
can't parse instead of failing all SSL connections.

See related issues:

- https://github.com/python/cpython/issues/79846
- https://github.com/openssl/openssl/issues/25023

[0]: https://github.com/python/cpython/pull/91740

Ref !124943.
2024-08-06 19:04:22 +02:00
Bastien Montagne 7a8c93c0b3 Fix #125636: Active camera not always valid after undo/redo.
There was already code to handle active scene pointer for the window.
Simply replace it by a call to `wm_data_consistency_ensure`, which will
ensure that all potentially missing pointers in UI data get reset.
2024-08-06 19:04:22 +02:00
Lukas Tönne 517255555e Fix #125607: Double imports due to duplicate IO paths
`paths_from_operator_properties` can return paths for both the explicit
operator `filepath` property as well as the `directory` content.
16129d6a attempted to fix this, but fails because one instance of a path
can be absolute and the other negative.

This patch makes sure to only compare absolute paths. Comparison uses
a separate list so that the final output can still mix absolute and
relative paths, but should only include each path once.

Pull Request: https://projects.blender.org/blender/blender/pulls/125608
2024-08-06 19:04:22 +02:00
Jesse Yurkovich 72f27b3cd9 Fix #125402: Guard against missing OCIO data for realtime compositor
The newly added viewport compositor was missing a try-catch guard around
the OCIO `getProcessor` call. All prior call sites were protected except
this one.  Unhandled exceptions can occur if the user tries to use a
colorspace config that is not present in their OCIO configuration.

The surrounding code paths need some work in order to not crash at a
later point, which would also impact builds with no OCIO support at all.
In the case of no OCIO support at all, a warning label is placed on the
node as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/125526
2024-08-06 19:04:22 +02:00
Hans Goudey ba9b9ebc34 Fix #125400: Copy modifier to selected ignores modifier pinning
If we encounter this problem again it's probably worth extracting this
modifier addition to a helper function.
2024-08-06 19:04:22 +02:00
Iliya Katueshenock 5424a20359 Fix #125588: Revert: Fix #120592: File output node not showing up in search
In 095d37c186 being added
drag-and-drop support for the node which still have no dynamic declaration itself.
This revert previous change. Real support will be added with #108728

Pull Request: https://projects.blender.org/blender/blender/pulls/125596
2024-08-06 19:04:22 +02:00
Aras Pranckevicius b11f90a4c3 Fix #125446: Video decoding artifacts on AVX512 CPU with some video widths
When a video width is a multiple of 8 but not 16 (i.e. line size
stride of RGBA frame is multiple of 32 bytes but not 64 bytes), then
on an AVX512 capable CPU the decoded video has a block of "wrapped"
artifacts on the left side.

This started happening in 4.1 with 4ef5d9f60f, where the vertical flip
is done together with YUV->RGB conversion. The logic in there checks
whether ffmpeg frame line size (which might include necessary SIMD
alignment/padding) matches packed imbuf line stride. However, ffmpeg
arguably has a bug, where `av_frame_get_buffer` always uses 32 byte
alignment, instead of 64 byte when on AVX512 code path. Report
has been made to ffmpeg upstream: https://trac.ffmpeg.org/ticket/11116
and in the meantime, explicitly pass `av_cpu_max_align` to
`av_frame_get_buffer`.

Pull Request: https://projects.blender.org/blender/blender/pulls/125578
2024-08-06 19:04:22 +02:00
Philipp Oeser e34b2fc90d Fix #124836: Triangulate modifier changed behavior with custom normals
This reverts commit f3c32a36bc and the two followups.

The commit caused issues with both the operator and the modifier.

The operator could be fixed, for the modifier this needs deeper
investigation (see #124836 for a bit more info on this).

Until a better solution is found it is just better to go back to
previous behavior.

Reintroduces  #103562 for now

Pull Request: https://projects.blender.org/blender/blender/pulls/125499
2024-08-06 19:04:22 +02:00
Alaska 05cd19eabc Fix broken EEVEE material shadow mode versioning
Fixes an issue where the original material of the node tree wasn't
connected to the right sockets in most situations after applying
EEVEE-Next shadow mode versioning.

Pull Request: https://projects.blender.org/blender/blender/pulls/125438
2024-08-06 19:04:22 +02:00
Germano Cavalcante ab6bddad4f Fix #123179: can't select multiple snap target elements in UV Editor
Missed after 'Set Snap Base' commit.

Just like in 3D View, UV editing can also benefit from selecting
multiple snap target elements.

The C++ code was already done, it was only necessary to edit the
interface.

Pull Request: https://projects.blender.org/blender/blender/pulls/124986
2024-08-06 19:04:22 +02:00
Campbell Barton 55286169c7 Fix #125763: Uninitialized extension repos printing warnings on startup
Since [0] missing repository directories printed a warning on startup.

When checking for blocked extensions on startup, skip directories
that don't exist & don't print any warnings if the repository data
hasn't been downloaded.

[0]: 656fe6d3e4
2024-08-06 19:04:22 +02:00
Campbell Barton 0b9f3e2e88 Extensions: support "blocklist" in the remote repository
Support blocking extensions so there is a way for the maintainers of
the remote repository to notify the user if one of their installed
extensions blocked along with a reason for blocking.

Blocked extensions cannot be installed from the preferences or by
dropping a URL.

When an installed & blocked extension is found:

- An icon int the status bar shows an alert,
  clicking on the icon shows the blocked extensions.
- The extensions preferences show a warning.
- The extensions & add-ons UI shows an alert icon
  and "details" section shows the reason.

Details:

- Blocked & installed extensions are shown first in the installed
  extensions panel.
- The internal "install" logic prevents downloading & installing
  blocked extensions.
- Blocked extensions can still be downloaded & installed from disk.
- The "list" command includes an error message if any installed
  extensions are blocked.
- The "server-generate" command can optionally take a configuration
  file that includes the blocklist for the generated JSON.

See design #124954.
2024-08-06 19:04:22 +02:00
Campbell Barton ffa8243158 Fix unhandled exception for non dictionary items in extensions repo
Ensure items in the repository list are dictionaries.
2024-08-06 19:04:22 +02:00
Jesse Yurkovich 9d99422091 Fix #125395: Build: Missing include for s390x arch
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/125397
2024-08-06 19:04:22 +02:00
Hans Goudey 504aff48be Fix #125404: Crash converting matrix attribute
The allocation for the new attribute array ignored type alignment.
2024-08-06 19:04:22 +02:00
Julian Eisel c6aa85c516 Fix #123735: Tooltip missing from open URL preset operator
Necessary because the "type" property is no longer the default
`bl_property` since 7bc34283ea.
2024-08-06 19:04:22 +02:00
Philipp Oeser ecdcd01270 Fix: Tracking related RNA paths incomplete/wrong
While working on !125365, I was running over a couple of places where
RNA paths were also incomplete.

This PR covers:
- MovieTrackingDopeSheet
- MovieTrackingSettings

Pull Request: https://projects.blender.org/blender/blender/pulls/125373
2024-08-06 19:04:22 +02:00
Philipp Oeser 3c8bbe3369 Fix #125064 : Cursor Value to Selected wrong with Normalized FCurves
This affected cursor snapping as well as the `Jump to Keyframes`
operator since both use `sum_selected_keyframes` to get the averaged
values of elements. It was already taking into account the normalization
factor, but the way a single `KeyframeEditData` was created from
multiple `bAnimListElem` was wrong:

- first, we should only add to it if we actually have some keys selected
(not a problem without normalization, but with it, we would add values
there
- second, the offset needs to be taken into account for each selected
key when adding to the absolute values

Could go into LTS probably

Pull Request: https://projects.blender.org/blender/blender/pulls/125221
2024-08-06 19:04:22 +02:00
Aras Pranckevicius 09afcef1ce Fix #124899: Font bounding box calculation is incorrect for some fonts
This is visible in VSE text strip "box" and "outline" options at least.
For some fonts (mostly script/cursive type) BLF_boundbox function
was calculating horizontal bounds purely from pen position and
advance to the next character position. But the actual glyph can extend
beyond the advance distance.

Curiously, blf_font_boundbox_foreach_glyph (used by
blf_str_offset_from_cursor_position and blf_str_offset_to_glyph_bounds)
was already doing the correct thing and taking glyph horizontal bounds
into account.

Pull Request: https://projects.blender.org/blender/blender/pulls/125363
2024-08-06 19:04:22 +02:00
YimingWu eb8de8cab2 Fix #125340: Div by zero in LineArt shadow stage
There could be a rare case where a div by zero situation would take
place in LineArt shadow stage where the silhouette and shadows are
calculated, which would cause infinite shadow edge cutting. Now will
return a non-cutting state for those edge cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/125361
2024-08-06 19:04:22 +02:00
Campbell Barton 9f79e9d4da Fix failure to toggle filtering for add-ons with long names
Regression from [0] which didn't increase the length of owner_id names.

[0]: 31cb31d736
2024-08-06 19:04:22 +02:00
Campbell Barton 0bb0ebe05f Fix #122754: Extensions empty when filtering addons in the workspace 2024-08-06 19:04:22 +02:00
Campbell Barton d5bd1e88a8 Cleanup: remove unused BUG_ADDON URL preset 2024-08-06 19:04:22 +02:00
Dalai Felinto c5c37b5bef Fix #122858: Core extensions report bugs to add-on repository
Core extensions should have their bugs reported as any other issue in
Blender.

This PR removes their "Rrport a Bug" link.

I left the link only for glTF since it has its own tracker. But I
wouldn't mind removing it as well.

Ref: !125218
2024-08-06 19:04:22 +02:00