Commit Graph

110441 Commits

Author SHA1 Message Date
Thomas Dinges
a49efc5b17 Release: Bump to 4.2 release. 2024-07-15 21:25:41 +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
Lukas Tönne
9ce61d7222 Fix #123076: Remove UI line for removed property
The `keep_custom_normals` property was removed in
f3c32a36bc.

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] a362c225c0

Pull Request: https://projects.blender.org/blender/blender/pulls/124698
2024-07-14 23:29:29 +02: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 983e4a7543

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 7fe7b2eed0

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 4c7456677d.
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
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
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
Campbell Barton
7ee6451a51 Extensions: support adding system repositories via the command line 2024-07-10 17:39:06 +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
Pablo Delgado Krämer
7cc0e48882 Fix #124016: Translate Image Texture node color spaces to MaterialX
This addresses #124016. The report provides a scene to test the changes.

Currently, the Blender and MaterialX color spaces are not fully aligned,
but the linear/srgb heuristic should cover most cases however.

Pull Request: https://projects.blender.org/blender/blender/pulls/124315
2024-07-09 21:06:08 +02:00
Pratik Borhade
63cb33139f Fix #124288: Channels overlap the Dope Sheet search
Channels are drawn after/on top of the search box. To fix this, move
`ED_time_scrub_channel_search_draw` below the channel drawing function.

Pull Request: https://projects.blender.org/blender/blender/pulls/124331
2024-07-09 17:57:07 +02:00
Clément Foucault
983e4a7543 Fix: EEVEE: Shadow mode versioning node affecting Cycles
Even if Cycles is not the active render engine, this
versioning code could affect Cycles if a material was
used with Cylces in another file (using linking).

Fix this by spliting the output node into another one
that only affects EEVEE.
2024-07-09 16:46:06 +02:00
Omar Emara
0251db1447 Fix #124335: Viewport compositor crash upon scene change
The viewport compositor crashes when the scene is changed in some
situations. That's because the viewport compositor tries to use node
tree data that was freed in the last depsgraph update, while it should
have invalidate those references based on the same depsgraph update.

The source of this issue is in the depsgraph itself. In particular, when
the depsgraph evaluation happens in two passes, the ID recalculate flags
are backed up for every pass then restored at the end of all passes,
however, this doesn't happen for the ID Type Update table. So whenever
evaluations happen in two passes, changes will not be propagated to
engines that require those information, like the viewport compositor
engine in that particular case.

To fix this, we backup and restore the ID Type Update table in a similar
manner to the ID recalculate flags.

Fixes #107235, #124335, #116142.

Pull Request: https://projects.blender.org/blender/blender/pulls/124409
2024-07-09 16:10:58 +02:00
Clément Foucault
7fe7b2eed0 Fix: EEVEE: Hardware discrepancy with math wrap function
The math render tests were not passing on the AMD hardware.
This was due to some compiler behavior not returning 1
on the `floor((a - c) / (b - c))` calculation even if
`a` and `b` were equal.
2024-07-09 14:13:32 +02:00
Jeroen Bakker
34380f5c37 Fix #124377: EEVEE Incorrect HDRI Previews location
When render border is active the default framebuffer view is changed
and results to rendering the HDRI previews inside the render border
and not in the bottom right corner of the 3d viewport.

This PR fixes it by resetting the viewport when drawing the HDRI
previews.

Also tried to pass the DRW default view during submission, but that
didn't fixed the issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/124402
2024-07-09 13:30:09 +02:00
Campbell Barton
1cfc83d5f6 UI: add cancel_default option to WindowManager.invoke_props_dialog
Make it possible that the cancel option is default for operator
popups.
2024-07-09 19:26:25 +10:00
Christoph Lendenfeld
0e8f36e63d Fix #106946: NLA sync length stops keys from being inserted
The option on NLA strips "Sync Length" (in the Action Clip dropdown of the N panel)
stops keys from being inserted if it is disabled.
This is due to the evaluation mode of the strip, which is set
to "Hold" internally but ONLY IF "Sync Length" is enabled.
Removing that condition allows to key in tweak mode regardless of that setting.

## History
This has been put in place by 89ee260ef2
Judging by the commit description, this was put in place to allow keyframing
in tweak mode. However, no explanation is given why this is only allowed
with "Sync Length" enabled. Potentially because there was no special
handling of tweak strips for keying evaluation, which has been put in
place later. (09709a7e64)

Pull Request: https://projects.blender.org/blender/blender/pulls/123902
2024-07-09 09:16:50 +02:00
Campbell Barton
8bbe1fe6ef CMake: remove logic to exclude removed add-ons directories
Using a REGEX on an absolute path may not work reliably without
escaping the path. Remove the exclusion as these paths are no longer
part of Blender's sources.

If some developers happen to have these directories it's harmless as
they won't be used.
2024-07-09 15:32:08 +10:00
Campbell Barton
da9cfbdae9 Docs: add doc-string to mathutils.Vector swizzle attributes
Also refactor definitions into a macro as they were exceeding the
line-length and wrapping.

Ref: !124275

Co-authored-by: Nathan Burnham <nathan@nathanburnham.uk>
2024-07-09 13:45:07 +10:00
nutti
5523662414 Docs: add default parameters to Context.temp_override
Ref: !124348
2024-07-09 13:44:09 +10:00
Richard Antalik
1f42c9eb54 Fix: Crash when clicking on unrealized retiming key
When keys are realized, strip handle positions are used to ensure, that
left and right key exists. If strip content is offset to the right,
this caused crash. This happened, because `SEQ_retiming_add_key()`
clamped timeline frame to strip content only on right side.

Clamp timeline frame to strip content on both sides.

Pull Request: https://projects.blender.org/blender/blender/pulls/124207
2024-07-09 01:30:40 +02:00
Sean Kim
d527e3a6bd Fix #122947: Curve stroke on duplicate object doesn't update normals
When a mesh is shared between multiple objects, sculpting with a brush
with the Curve stroke type doesnt update normal values for the affected
nodes when using PBVH drawing. This is because when reevaluating the
depsgraph for the objects, the shared PBVH is destroyed and the nodes
are recalculated, losing the existing node flag updates.

This only occurs for the Curve stroke type because all of its stroke
steps are performed within a single call to the overall operator when
the user presses enter, unlike other brush strokes which apply on each
mouse movement.

To fix this, we simply force update the normals before destroying the
PBVH at the end of the stroke step.

Pull Request: https://projects.blender.org/blender/blender/pulls/124268
2024-07-08 21:36:28 +02:00
Harley Acheson
9a26bfcd5f Fix: Shade Smooth Removal Notification When Needed
Only send `NC_OBJECT | ND_DRAW` notification if the smooth by angle
modifier has been removed, not on all changes. This is a slight
adjustment to #124330.

Pull Request: https://projects.blender.org/blender/blender/pulls/124362
2024-07-08 21:35:26 +02:00
Pratik Borhade
e8f0dabc7e Fix #124302: Crash when clicking arrow button in outliner
This is due to missing rebuild of outliner tree. Auto smooth operator
is cleared with shade flat execution but outliner is unaware of this and
the modifier tree element remains intact. This add a notifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/124330
2024-07-08 18:42:06 +02:00
Jesse Yurkovich
7d6835f043 Fix #124075: Read Alembic point cloud velocity data
This regressed during the change to use GeometrySets in ea256346a8.

Pull Request: https://projects.blender.org/blender/blender/pulls/124077
2024-07-08 17:56:43 +02:00
Jesse Yurkovich
f9b2edbf01 Fix #124009: Clamp material index when uploading mesh through Hydra
Prevent crash from a mesh created around the time of Blender 4.0 with
bad (negative) material indices on some faces.

The Poly Haven folks were poked to fix the actual asset as well but it's
simple enough for us to clamp in this code path, especially since we
were already doing it for the upper bound.

Pull Request: https://projects.blender.org/blender/blender/pulls/124026
2024-07-08 17:55:50 +02:00
Clément Foucault
15b2d77f29 Fix: EEVEE: Invalid sphere probe border pixel
Border pixels of the world probe were not
copied correctly to local sphere probes.

Maybe side effect of #123074 or maybe it was
always broken.

Fix is to use the same sampling functions as
regular sampling for biasing the UVs correctly.

Fixes render tests.
2024-07-08 17:27:10 +02:00
Sybren A. Stüvel
9d3dc77e05 Anim: move Bone Selection Sets add-on into Blender
The functionality of the Bone Selection Sets add-on is now integrated
into Blender itself. Rigify has been updated to no longer check for the
add-on, but just assume that the functionality is available.

The keymap is still the same, and so are all the class names. This
ensures that there are no conflicts when people still have the old
add-on enabled somehow. And there is versioning code to remove the
'add-on enabled' state so that Blender won't complain it cannot find it
any more.

Compared to the add-on, the following changes are made:

- The 'bone' icon has been removed from the list of available selection
  sets. It was the same for each entry anyway, and thus didn't provide
  any information.
- The code has been split up into multiple files, with the UI elements
  in `scripts/startup/bl_ui/properties_data_armature.py` and the
  operators in `scripts/startup/bl_operators/bone_selection_sets.py`.
- Helper functions and classes are prefixed with `_` to indicate that
  they are not part of any public API.
- The `Operator` helper subclasses have been transformed to mix-in
  classes. This way the only subclasses of `Operator` are the actual
  operators.
- Comments & descriptions have been updated for clarity & consistency.

This commit contains code by the following authors, ordered by number of
commits in the original add-on repository, highest first:

Co-Authored By: Ines Almeida <britalmeida@gmail.com>
Co-Authored By: Sybren A. Stüvel <sybren@stuvel.eu>
Co-Authored By: Campbell Barton <ideasman42@gmail.com>
Co-Authored By: meta-androcto <meta.androcto1@gmail.com>
Co-Authored By: Demeter Dzadik <Mets>
Co-Authored By: lijenstina <lijenstina@gmail.com>
Co-Authored By: Brecht Van Lommel <brechtvanlommel@gmail.com>
Co-Authored By: Aaron Carlisle <carlisle.b3d@gmail.com>

For the full history see the original add-on at:
https://projects.blender.org/blender/blender-addons/commits/branch/main/bone_selection_sets.py

Reviewed On: https://projects.blender.org/blender/blender/pulls/124343
2024-07-08 16:28:42 +02:00
Philipp Oeser
93585602a1 Fix #100164: Alembic import: Ensure mesh normals are normalized
Similar to !124267 and !124261

This normal data is eventually passed into `BKE_mesh_set_custom_normals`
and through to `mesh_normals_corner_custom_set` which expects normals to
actually be normalized per its documentation.

Not doing so would yield meshes with incorrect "sharp" data for affected
edges.

Thx @OmarEmaraDev for the initial patch

Pull Request: https://projects.blender.org/blender/blender/pulls/124336
2024-07-08 16:03:52 +02:00