Commit Graph

138898 Commits

Author SHA1 Message Date
Julian Eisel
46c0d3e644 Fix: Broken active highlighting of assets in the asset shelf
Suspecting a mismatch when asset weak references stored using Unix style
paths with ones generated at runtime with Windows sytle paths.

Pull Request: https://projects.blender.org/blender/blender/pulls/124415
2024-07-09 19:07:18 +02:00
Jacques Lucke
57f1d959d4 Cleanup: use StringRefNull instead of std::string for instance reference name 2024-07-09 18:56:09 +02:00
Jacques Lucke
39d509f91f Fix: incorrect preview image shallow copy 2024-07-09 18:53:50 +02:00
Jacques Lucke
d0c6bce884 Fix: new/free mismatch
Also see 06be295946.
2024-07-09 18:31:13 +02:00
Jacques Lucke
a57d1ae35e Cleanup: fix compilation
For some reason, `MTex` is trivial on some platforms and not on others.
2024-07-09 18:20:11 +02:00
Sybren A. Stüvel
c26dc45bd9 Merge remote-tracking branch 'origin/blender-v4.2-release' 2024-07-09 18:11:21 +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
Falk David
509cb361bb GPv3: Remove tint tool from tool bar
This is now accessible from the draw tool as a brush asset.

Pull Request: https://projects.blender.org/blender/blender/pulls/124421
2024-07-09 17:17:25 +02:00
Jacques Lucke
dc8e9678e1 Geometry Nodes: allow naming geometry sets
This adds a new `name` member to the `GeometrySet` class. This name can be set
with the new `Set Geometry Name` node. Currently, the name is only used in the
spreadsheet when displaying instances.

The main purpose of this name is to help debugging in instance trees. However, in the
future it may also be used when exporting instance trees or when creating separate
objects from them.

Note, the name is not expected to be unique, it is fully in user control.

Naming geometries is necessary to make the spreadsheet more useful for instances,
because currently the user has no information for which geometry is used by each instance.

We also want to use this name to improve the integration with grease pencil where
sometimes layers become instances with the same name.

Pull Request: https://projects.blender.org/blender/blender/pulls/114910
2024-07-09 17:03:54 +02:00
Aras Pranckevicius
6f0620161d Fix #123949: OBJ importer should not set face sharpness when vertex normals are present
Having both custom vertex normals and the "is the face sharp?"
attribute on a mesh leads to some non-intuitive behaviours. Instead,
make the behaviour more aligned with OBJ format description wording,
which says "When vertex normals are present, they supersede
smoothing groups" (https://paulbourke.net/dataformats/obj/).

Pull Request: https://projects.blender.org/blender/blender/pulls/124366
2024-07-09 16:59:17 +02:00
Clément Foucault
e0474c4bd3 Merge branch 'blender-v4.2-release' 2024-07-09 16:47:16 +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
Clément Foucault
ee94e84ab2 EEVEE: Make tests pass on all platforms
Increase fail threshold for tests with platform
dependent noise.
Blacklist `principled_thinfilm_transmission` as
the IOR is very small and isn't packed to the GBuffer
with the same precision on every platform.
2024-07-09 16:46:06 +02:00
Jacques Lucke
056ac7f407 Fix: new/free mismatch in a few cases
Also see 06be295946.
These aren't all cases, but a few that I found by addding a static
assert in `MEM_new` so that it fails for trivially constructible types.
2024-07-09 16:22:04 +02:00
Omar Emara
cad488e820 Merge branch 'blender-v4.2-release' 2024-07-09 17:12:39 +03: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
Falk David
55162916ca Fix: GPv3: Draw Tool: Prevent trim_end_points from removing entire stroke
The `trim_end_points` in the draw tool was only supposed to be able to remove
end points of the stroke.
Make sure to clamp the value so that at least one point remains in the curve.
2024-07-09 16:08:04 +02:00
Sybren A. Stüvel
1b09466e13 Refactor: Anim, move some Slot methods next to their siblings
Move some methods on `Slot` in the source file so that they sit next to
their siblings. Some unrelated functions squeezed in between them.

No functional changes.
2024-07-09 15:57:48 +02:00
Jacques Lucke
edd40007ab Fix: new/free mismatch
Also see 06be295946.
2024-07-09 15:39:09 +02:00
Bastien Montagne
57e9abb564 Cleanup: Remove left-over call to BKE_blendfile_write_partial_end.
BPY `library.write` has been moved to new PartialWriteContext code a few
weeks ago, removing this call to `BKE_blendfile_write_partial_end` was
somehow missed then.
2024-07-09 15:27:12 +02:00
Bastien Montagne
17af2bb83c Cleanup: BKE Workspace: Remove unused BKE_blendfile_workspace_config_write. 2024-07-09 15:23:44 +02:00
Falk David
2cebb9bc49 Assets: Grease Pencil: Update all draw brushes 2024-07-09 15:22:05 +02:00
Sergey Sharybin
9125fb868e Merge branch 'blender-v4.2-release' 2024-07-09 15:21:35 +02:00
Sergey Sharybin
6d3b4f1c32 Fix #121911: macOS: Interference with sound in other applications
Turns out closing AudioUnit handle could interfere with other software.

It is something Apple is investigating, to see if it is API not used
correctly, or whether there is something to be fixed in the Core Audio.

Until then disable the code which closes audio handles. It rolls back
to the situation when the computer might not be able to sleep properly,
but it is how the previous release was, and overall it is less annoying
than causing an interference.

Once the issue is looked into by Apple we will re-iterate over having
both issues (interference and power management) resolved.

Pull Request: https://projects.blender.org/blender/blender/pulls/124400
2024-07-09 15:20:49 +02:00
Falk David
2efc3e8db2 Cleanup: Formatting 2024-07-09 15:12:58 +02:00
Falk David
6a69b1789e Fix: GPv3: Crash caused by invalid curve plane normal
In some cases, the plane normal would not be normalized
correctly. This fixes the normalization and ensures the normal
has a length of 1.
2024-07-09 15:11:39 +02:00
Clément Foucault
d01d2ec91b EEVEE: Update tests 2024-07-09 14:52:59 +02:00
Clément Foucault
acf7eab3b5 Merge branch 'blender-v4.2-release'
# Conflicts:
#	tests/data
2024-07-09 14:52:34 +02:00
Clément Foucault
afeb38f76f EEVEE: Blacklist pointcloud volume render tests
This test is testing a feature that is not supported yet
and has different behavior depending on the hardware.
2024-07-09 14:48:43 +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
Lukas Tönne
2eaf85aa54 Fix #124393: GPv3: invalid frame when inserting in the draw tool
The draw tool tries to insert a duplicate frame when using additive
drawing, but the start frame it tries to duplicate can be null.
Check the return value of `start_frame_at` before using it, and insert
an empty frame if no start frame exists.

Pull Request: https://projects.blender.org/blender/blender/pulls/124396
2024-07-09 13:49:35 +02:00
Julian Eisel
280a8afa76 Fix "Reset to Default" using wrong value for asset shelf preview size
Use RNA callback to get the actual default value (which asset shelf
types may define using `AssetShelf.bl_default_preview_size`.
2024-07-09 13:37:57 +02:00
Jeroen Bakker
71de545697 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:32:54 +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
Julian Eisel
3f0aabbec6 Fix new/free mismatch with asset shelf duplication 2024-07-09 13:05:41 +02:00
Sybren A. Stüvel
1276680874 Anim: Action editor, show slot user count if not equal to 1
In the Action editor, show the number of users for each slot.

- 1 user (the expected case): not shown
- multiple users: number is shown between parentheses, f.e. `(3)`
- none: shown as `(unassigned)` as I think that's clearer than `(0)`.

This PR doesn't technically depend on !122500, but having that landed
first will make testing this one quite a bit easier.

Pull Request: https://projects.blender.org/blender/blender/pulls/124337
2024-07-09 12:56:33 +02:00
Campbell Barton
d44b96bf07 Merge branch 'blender-v4.2-release' 2024-07-09 20:41:11 +10:00
Campbell Barton
3a29e25d21 Extensions: expand on the error report when a repository is locked
- Include the repository name.
- Add a hint for force-unlocking the repository.
2024-07-09 20:39:23 +10:00
Campbell Barton
13200f1f60 Merge branch 'blender-v4.2-release' 2024-07-09 19:49:51 +10:00
Campbell Barton
987a027326 Merge branch 'blender-v4.2-release' 2024-07-09 19:49:49 +10:00
Campbell Barton
29f5d56359 Merge branch 'blender-v4.2-release' 2024-07-09 19:49:46 +10:00
Campbell Barton
48dbda62a5 Merge branch 'blender-v4.2-release' 2024-07-09 19:49:44 +10:00
Campbell Barton
b44d5cb5af Fix unhandled exception when updating legacy add-ons to extensions 2024-07-09 19:45:18 +10:00
Jacques Lucke
165b60fd3e Fix #124398: new/free mismatch
Also see 06be295946.
2024-07-09 11:43:54 +02:00
Julian Eisel
00ff0e275a Fix potential null-pointer dereference when displaying asset tags 2024-07-09 11:38:46 +02:00
Campbell Barton
f4231418e9 Extensions: limit the size of the data read from the lock-file
Avoid reading a large amount of data if the lock file
inexplicably contains large amounts of data.
2024-07-09 19:37:12 +10:00
Campbell Barton
1ffde9338d Extensions: support force unlocking a repository
When the repository is owned by another Blender session,
support removing the file-system lock.

This is accessible from a menu in the repository popover.

This is needed if Blender exits unexpectedly while a repository
is being modified (typically install/upgrade).

Addresses #122135.
2024-07-09 19:27:32 +10: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
Nathan Vegdahl
8b44d6fb0d Fix: inserting keys in Action editor for non-active ID doesn't work
After #122672 landed, slots other than the the slot for the currently active
ID became accessible from the Action Editor.  However, the code for inserting
keys directly in the Action Editor assumed that the ID being keyed was
always the active one.  This made inserting keys on slots other than the slot
for the active ID fail because the RNA paths wouldn't resolve for that ID.
Additionally, even if they did resolve (e.g. if the ID type was the same), the
keying code would use the wrong ID anyway, which would result in unexpected
behavior regardless.

This commit fixes this by looking up an ID that actually uses the given slot,
and using that ID to perform the keying.

Note that there are various corner cases that have to be handled, such as when
there is more than one user of a slot (and none of them are the active ID),
which makes the choice ambiguous, or when there are no users of a slot.  We
handle these corner cases by simply keying the fcurves directly, rather than
going through the normal keyframing code paths.  This means that in those corner
cases the value of the property in the scene is ignored, and the fcurve is
simply keyed with whatever value the fcurve evaluates to on that frame.  We may
revisit this in the future if this fallback behavior turns out to not feel good
to users in practice, but for now it seems like a reasonable solution.

Pull Request: https://projects.blender.org/blender/blender/pulls/124227
2024-07-09 11:25:45 +02:00
Nathan Vegdahl
45c489396f Refactor: move RNAPath == operator implementation to a free function
This is to follow C++ core guidelines.  Based on this discussion:
https://projects.blender.org/blender/blender/pulls/123998#issuecomment-1229591

Pull Request: https://projects.blender.org/blender/blender/pulls/124394
2024-07-09 11:24:12 +02:00