Commit Graph

138907 Commits

Author SHA1 Message Date
Hans Goudey
879eca663a Fix #124419: Smooth brush broken for larger meshes
Simple mistake in 68d6bf56e5.
2024-07-09 17:19:00 -04:00
Hans Goudey
248910be1f Fix: Build error on Windows after recent fix
`PreviewImage` is a non-trivial type on MSVC and can't
be allocated with `MEM_cnew`.
2024-07-09 16:16:56 -04:00
Jesse Yurkovich
30407af01c Hydra: Update Storm reference images after color space fix 2024-07-09 12:38:11 -07:00
Hans Goudey
1d5bf4ca56 Refactor: Sculpt: Change parts of snake hook brush to new structure
- Access positions from a thread-local array
- Replace use of the proxy system with immediately applied translations
- Access data from stroke cache directly
2024-07-09 15:26:30 -04:00
Hans Goudey
426ffa6000 Refactor: Sculpt: Specialize snake hook brush per PBVH type
Part of #118145.
2024-07-09 15:26:30 -04:00
Jesse Yurkovich
3c65b154eb Merge branch 'blender-v4.2-release' 2024-07-09 12:07:15 -07: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
Hans Goudey
5665243bef Cleanup: Use C++ types for snake hook brush 2024-07-09 14:10:05 -04:00
Hans Goudey
3009d4f28c Cleanup: Sculpt: Move snake hook brush to separate file 2024-07-09 13:31:45 -04:00
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