137759 Commits

Author SHA1 Message Date
Thomas Dinges
a39fa10b5b Manual: Update RNA references for 4.2 2024-07-15 17:35:59 +02:00
Thomas Dinges
1c3d51a2f1 Release: Update freedesktop xml for 4.2. 2024-07-15 16:40:01 +02:00
Jeroen Bakker
b761d3435f Image Plane: Add support for EEVEE
- Fixes incorrect handling of incompatible engines. There is a global list of compatible
  engines, but `create_cycles_material` didn't use it, displaying an incorrect warning
  when using the operator.
- Add `BLENDER_EEVEE_NEXT` to compatible engines.
- Remove `BLENDER_EEVEE` from compatible engines.
- Add render method option. This replaces the material `blend_method`
- Remove material blend method option (replaced by `render_method`)
- Remove material shadow option. Not needed anymore as shadows use
  the node tree for evaluation.

**TODO**
- Manual should still be updated. Will be done after this patch lands.
- I did some basic tests. I am not familiar with this operator, but think it
  should handle all the different cases. Would be nice to have some
  render tests for this to detect regressions.

Implements: #122315
Pull Request: https://projects.blender.org/blender/blender/pulls/124094
2024-07-15 15:35:57 +02:00
Clément Foucault
c7bcd1137f Fix: UI: Hide studiolight world orientation button for Cycles
This option is not available in EEVEE anymore. Limit the
visibility to Workbench.

Fix #124521

Pull Request: https://projects.blender.org/blender/blender/pulls/124717
2024-07-15 11:59:26 +02:00
Aras Pranckevicius
4d6ba7604d Fix #124584: VSE thumbnail transparency for muted strips is wrongly stored in cache
Make sure the code that alters the VSE thumbnail to add transparency
(for disabled strips) works on a copy of the image, so that the extra
transparency does not get "stored" into the thumbnail cache.

Pull Request: https://projects.blender.org/blender/blender/pulls/124689
2024-07-15 11:47:39 +02:00
Campbell Barton
cec4531dde Fix window creation error on wayland when EGL resource allocation fails
Quickly opening & closing windows could result in an error allocating
the EGL context.

In my tests the window would be created but not display (in GNOME)
hanging for a while although Blender could be usable again after a
while. However some users report this crashing (see #123096).

Change the behavior to match X11, where failure to set the context
makes the GHOSTWindow::getValid return false.

In my tests the Blender window is created after a short delay.
This may also resolve #123096.
2024-07-15 19:41:51 +10:00
Bastien Montagne
510270f80a I18N: updated UI translations from git/weblate repository (43b5cb1cbab4c7ea). 2024-07-15 10:36:02 +02:00
Lukas Tönne
9ce61d7222 Fix #123076: Remove UI line for removed property
The `keep_custom_normals` property was removed in
f3c32a36bcfcad4fb948fb1eb205a2790967b1de.

Pull Request: https://projects.blender.org/blender/blender/pulls/123079
2024-07-15 09:51:55 +02:00
Nathan Burnham
988bf2b88f Fix incorrect exception message on collection key type error
String keys aren't supported.

Ref: !123577
2024-07-15 11:07:27 +10:00
Germano Cavalcante
742943f554 Fix: error in previus commit 7249b7
Use of uninitialized variable.
2024-07-14 22:05:59 -03:00
Germano Cavalcante
7249b78b6b Fix #124545: Axis constraints in knife failing
The problem was basically that, after efd3c4b3c9, `test_cagep` started
to be used without being calculated.

`test_cagep` represents the closest 3D point on an edge.

The solution was to edit the `knife_snap_edge_constrained` function to
calculate the `test_cagep` instead of the `closest_ss` (which is the
projected point).

Calculating `test_cagep`(3D) instead of `closest_ss`(2D) is
advantageous as we avoid matrix transformations and achieve more
precision.

We also deduplicate the code a bit since `closest_ss` can be obtained
by projecting `test_cagep`.

This commit also adds comments to the code, and renamed some variables
and functions for more clarity.

Pull Request: https://projects.blender.org/blender/blender/pulls/124701
2024-07-15 02:47:03 +02:00
Jesse Yurkovich
ba6a89e5db Fix: Incorrect free of null IDProperty array during Collection Export
This was unfortunately regressed during another recent fix [1].

Simply check for null last_properties before removing them.

[1] a362c225c01

Pull Request: https://projects.blender.org/blender/blender/pulls/124698
2024-07-14 23:29:29 +02:00
Campbell Barton
b5145d6889 Fix #121469: "Enable Add-on" ignored when already installed
The logic to handle disabling, upgrading & re-enabling extensions
incorrectly assumed all installed add-ons were enabled.

Resolve by only using this logic on installed & enabled add-ons.
2024-07-14 21:14:14 +10:00
YimingWu
0f1f0d92bc Fix #124454: Allow BF_DIST_BIN to be a symlink
In `blender-launcher` on linux, the `$0` could be assigned to
a symlink instead of an actual directory, which may cause infinite
chaining of the command which ultimately gives an arguent string that's
way too long. This fix prevents that by using `readlink -f` first.

This fix was implemented by @Joel-Schumacher

Ref: !124533
2024-07-14 20:20:19 +10:00
Campbell Barton
a721c81668 Unbreak build from missing include 2024-07-14 20:09:11 +10:00
Alaska
0afee246ea Fix #124593: Reorder EEVEE material shadow versioning
Caused by 983e4a75432600e700019be3e7a59dd225014bea

Bail out case should be at the top

Pull Request: https://projects.blender.org/blender/blender/pulls/124600
2024-07-12 22:44:01 +02:00
Hans Goudey
40c25eaa03 Fix: Viewport transform node projection incorrectly transformed
The projection was transformed by the object transform, but it's meant
to be in camera space, not affected by the camera view transform or by
the local object's transform. This fix makes viewport raycasting use
cases work without a manual fix in nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/124610
2024-07-12 21:40:37 +02:00
Hans Goudey
38ee38f35f Fix #124548: Node tools redo behavior inconsistent
Currently the node tool operator stores the mouse position from
the first execution because it's not possible to retrieve it again from
the operator redo callback which doesn't have access to the event.

However, other inputs like the region size and the viewport transform
are retrieved again for every redo execution. This creates inconsistency
and generally makes redo less useful for node tools than it should be.
Generally tweaking an input in the redo panel should keep everything
else the same.

This commit adds the rest of the inputs as RNA properties just like
how mouse position is already handled.

Pull Request: https://projects.blender.org/blender/blender/pulls/124557
2024-07-12 16:23:20 +02:00
Jeroen Bakker
8ac023da61 Fix #124530: EEVEE: Math wrap function not working
Due to incorrect check the result was always returning the min
parameter.

Found issue by comparing the implementation with cycles.
Regression introduced by 7fe7b2eed0d59a082efdca242b4f5e684cb3e8b9

Pull Request: https://projects.blender.org/blender/blender/pulls/124604
2024-07-12 15:40:12 +02:00
Jacques Lucke
eb55d3f0d6 Fix: wrong type cast in previous commit
This was broken in 4c7456677d4216e1f183c630c0f0b59ab6ac701f.
2024-07-12 13:00:30 +02:00
Jacques Lucke
4c7456677d Fix: correct potentially wrongly initialized curve attributes
The `resolution` and `nurbs_order` attributes of curves are expected to be `>=
1`. Due to a bug, it was possible that they are initialized to zero: #124534.
This fix adds versioning code to fix the curves that have been written
incorrectly.

Pull Request: https://projects.blender.org/blender/blender/pulls/124539
2024-07-12 10:16:45 +02:00
Jacques Lucke
0c57e95f09 Fix: initialize built-in attributes with proper default value
Previously, it was fairly easy to create built-in attributes which have invalid
values, because attributes were generally zero-initialized. This was especially
problematic for attributes that had certain invariants that Blender relies on
and that should never be zero. For example, the curve resolution should always
be at least 1.

To reproduce the issue, add the `resolution` attribute from the attributes panel
to curves. They had a value of 0 by default. I found this while investigating
#124416.

Pull Request: https://projects.blender.org/blender/blender/pulls/124534
2024-07-12 10:12:03 +02:00
Campbell Barton
3358f427dd Fix #124457: Error enabling installed extension after failure to load
When Blender started with an extension enabled from a repository that
referenced a directory that didn't exist - creating the directory
and extensions would fail to import the extension.

This happened because the missing state of the module was cached.

Resolve by clearing Python's path cache for the repository after
running install actions which may have created the directory.

Also run importlib.invalidate_caches() when manually refreshing local
extensions to ensure modules cached as missing can be imported if
they have become available.
2024-07-12 16:22:09 +10:00
Richard Antalik
5d9f9f9964 Fix: VSE handle position drawing is reversed
When left handle is selected, right handle position was displayed.

Pull Request: https://projects.blender.org/blender/blender/pulls/124503
2024-07-12 03:59:19 +02:00
Jesse Yurkovich
af85fd3b22 Fix: Safely handle >4 channel float images inside IMB_dupImBuf
While investigating #124217 it was noticed that sometimes a >4 channel
ImBuf might be passed through to this api.

This would cause memory to be overwritten because the destination ImBuf
was created with only 4 channels of memory. Now we create it with the
proper number of channels.

Pull Request: https://projects.blender.org/blender/blender/pulls/124472
2024-07-11 17:44:09 +02:00
Jesse Yurkovich
7a076d26a6 Fix: Guard against null operation in ImageNode::convert_to_operations
Properly guard the conditionals inside ImageNode::convert_to_operations
against null operations.

I've duplicated the null check in order to not add another layer of
nesting in an already very deep set of conditionals.

Pull Request: https://projects.blender.org/blender/blender/pulls/124473
2024-07-11 17:43:45 +02:00
Jesse Yurkovich
a362c225c0 Fix #124479: Collection Export: Clear last-used operator properties
Collection Export and File->Export were inadvertently sharing the
"last used" operator properties.

This would cause settings that were used during File->Export to
interfere, silently, when exporting the collections. Or vice versa.

Pull Request: https://projects.blender.org/blender/blender/pulls/124481
2024-07-11 17:42:49 +02:00
Jacques Lucke
85760b6a13 Fix #123974: handle corrupted file missing baked data more gracefully 2024-07-11 17:25:29 +02:00
Jacques Lucke
1d4ef04a6d Fix #124463: crash when trying link a node to itself with swapping
The swapping code incorrectly expected the link to have a start and end.
However, this was not necessarily the case when attempting to create
a link from a node to itself. This case has special handling in
`node_link_find_socket`.
2024-07-11 15:00:02 +02:00
Jeroen Bakker
b9e15791f9 Fix #123052: EEVEE: Metal/AMD artifacts depth of field
This patch, provided by James McCarthy, removes artifacts on
Metal/AMD platforms when using depth of field.

Pull Request: https://projects.blender.org/blender/blender/pulls/124389
2024-07-11 11:09:36 +02:00
Sergey Sharybin
69e00c865d Fix #124217: Crashes with certain multi-layer/multi-part EXRs
Caused by a060e96103

This change restores the old behavior of pass name detection from
channel name prior to the offending commit.

The fix includes regression test based on the files from related
reports, to help catching possible issues in the future.

Being so close to the release this commit restored behavior prior
to the previous fix. Potentially this makes some files to detect
wrong pass name for some specific files, although it is not really
clear if such files exists in the wild.

Pull Request: https://projects.blender.org/blender/blender/pulls/124458
2024-07-11 11:04:08 +02:00
Campbell Barton
319684d8f6 Extensions: warn when extensions violate module policies
As each extension has it's own package, any modules it includes must be
imported as sub-modules. Warn if extensions are including themselves
in the sys.path as this breaks name-spacing of extensions.

Show these warnings in the add-on & extensions UI.
2024-07-11 17:50:30 +10:00
Campbell Barton
0bfea7caea Extensions: fix error it tests where the local repo wasn't cleared
Tests interfered with each other because the local repo path wasn't
cleared between different tests.
2024-07-11 17:37:31 +10:00
Campbell Barton
9ffc973918 Fix missing check for debug print 2024-07-11 14:22:49 +10:00
Campbell Barton
d13da71db4 Fix the extension add-on reloading when caching the extensions state
When the extensions add-on module was loaded before the add-on was
enabled, the module was detected as having changed since it had no
`__time__` member. Loading the add-on would then reload the module.

Resolve by setting the __time__ when first importing.
2024-07-11 14:12:36 +10:00
Campbell Barton
69fd60b41a Extensions: update tests from changes to repo-list 2024-07-11 11:22:30 +10:00
Campbell Barton
0c01a01133 Extensions: add command line "repo-add --access-token" support 2024-07-11 11:06:57 +10:00
Campbell Barton
f59e872b3b Extensions: show "source" & access-token in the repo-list sub-command 2024-07-11 11:06:21 +10:00
Campbell Barton
375b173d67 Extensions: correct help text for the "build" command 2024-07-11 10:18:45 +10:00
Jeroen Bakker
a2ba481c71 Fix 102994: GHOST: Fix transparent viewports
On specific platforms the viewport could be rendered transparent on
top of the OS desktop. Mesa adviced us to enable a `EGL_PRESENT_OPAQUE`
when its extension exists.

Partially fixes #102994; mesa-zink (https://docs.mesa3d.org/drivers/zink.html)
still shows transparent viewports. As this PR already improves the situation we
it will be merged.

Pull Request: https://projects.blender.org/blender/blender/pulls/124395
2024-07-10 21:59:13 +02:00
Jacques Lucke
6390f2e4c6 Fix #124391: crash in complex node setup with multi-threading
The lazy-function for a logical-or made the wrong assumption that
`try_get_input_data_ptr_or_request` returns null when `try_get_input_data_ptr`
returns null for the same input right before that. That's not true, because the
input might have been computed by another thread in the mean-time.

This wrong assumption lead to a bug because lazy-functions are always assumed to
either request more unavailable inputs, or compute all requested outputs. Here,
the lazy-function did neither. It wanted to request a new input, but it was
available already.

The solution is to handle the return value of
`try_get_input_data_ptr_or_request` properly.

Pull Request: https://projects.blender.org/blender/blender/pulls/124465
2024-07-10 18:00:48 +02:00
Thomas Dinges
e02c6fd130 Release: Bump 4.2 to rc 2024-07-10 16:13:17 +02:00
Sergey Sharybin
ec0221e26b Cleanup: Style 2024-07-10 15:58:09 +02:00
Thomas Dinges
f069692caf Release: Update license documents to reflect library updates. 2024-07-10 14:05:46 +02:00
Campbell Barton
7ee6451a51 Extensions: support adding system repositories via the command line 2024-07-10 17:39:06 +10:00
Campbell Barton
1fc2530179 mypy: remove non-existing file from config 2024-07-10 17:03:20 +10:00
Campbell Barton
b3fbc439fe readfile: add missing define check 2024-07-10 17:02:57 +10:00
il4n
e13b2f3774 Fix: VSE: Overlap after moving a retiming key was not handled
Moving a strip retiming key at the end of a strip, so that a strip
overlaps another one would leave them overlapped. The expected
behavior is that it acts according to the Overlap Mode, like it does
when moving a strip.

Co-authored-by: Richard Antalik <richardantalik@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124424
2024-07-10 02:21:14 +02:00
il4n
b2e3b6c393 Fix: VSE: Selected strips don't get tinted while transforming
If the "Overwrite" Overlap Mode was used, the non-active strips would
not get tinted while moving them.

Pull Request: https://projects.blender.org/blender/blender/pulls/124411
2024-07-10 01:21:13 +02:00
il4n
a23cb6b1d6 Fix: VSE Set Speed operator not handling overlap
Lowering the speed of a strip that doesn't have user-created retiming
keys using the "Set Speed" operator would cause the strip to overlap
neighboring strips. The fix shuffles the retimed strip to avoid
overlap. This now matches the behavior of the same operator, when
using it on a user created retiming key.

Pull Request: https://projects.blender.org/blender/blender/pulls/124414
2024-07-10 01:19:50 +02:00