Commit Graph

135041 Commits

Author SHA1 Message Date
Iliya Katueshenock
0bd6279504 Nodes: Display node label for tooltips on a free reroute
It is not so informative to display `Input` (name of input socket)
tooltip for free reroute node. Instead, use label for this.

Pull Request: https://projects.blender.org/blender/blender/pulls/120534
2024-04-11 19:16:07 +02:00
Jacques Lucke
248dafef74 Geometry Nodes: use rotation socket in Curve to Points node
Looks like this was forgotten before. Other similar sockets have been converted already.

Pull Request: https://projects.blender.org/blender/blender/pulls/120526
2024-04-11 19:05:22 +02:00
Falk David
0f72f67d56 Fix: GPv3: Crash after conversion because of strokes with no points
In GPv2 strokes could technically have zero points.
`CurvesGeometry` doesn't allow this, so we need to make
sure to explicitly skip over strokes with no points.

Pull Request: https://projects.blender.org/blender/blender/pulls/120536
2024-04-11 19:03:34 +02:00
Jacques Lucke
486947398f Geometry Nodes: add invertable boolean output to invert matrix node
Not all matrices are invertable (e.g. when a transformation matrix is has
a scale of zero), and it's sometimes important when a matrix is.

This also better specifies the behavior when the matrix is not invertable:
the identity matrix is returned.

Pull Request: https://projects.blender.org/blender/blender/pulls/120530
2024-04-11 18:28:57 +02:00
Jason Fielder
5f86faf3a5 Metal: Fix write-only qualifier on shader generation
A small logic issue caused all write-only image resources
to be tagged as read-write in all cases. This caused
correctness issues on Intel and AMD GPUs which
are resolved through this change.

Change also yields a small performance uplift
due to enabling improved non-dependent workload
scheduling.

Authored by Apple: Michael Parkin-White

Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/120528
2024-04-11 18:17:40 +02:00
Sean Kim
2582664f67 Refactor: Organize and fixup functions in sculpt_trim.cc
This PR performs the following refactors in sculpt_trim.cc:

* Remove `depth_front` and `depth_back` as `struct` properties, as they
  are only used for generating the Mesh
* Moves the `calculate_depth` call into the `generate_geometry` step as
  the latter is dependent on data from the former already
* Reorganize the methods so the overall file reads better.
* Minor comment nits and additions

Pull Request: https://projects.blender.org/blender/blender/pulls/120331
2024-04-11 17:53:46 +02:00
Iliya Katueshenock
9f89cc5072 Refactor: Nodes: Generate socket tooltips in more generic way
Split code to separate functions depending on the source of info for
socket inspection. Each function retrieves some optional string.
Collecting of result string is just loop.

Pull Request: https://projects.blender.org/blender/blender/pulls/120496
2024-04-11 17:52:59 +02:00
Jacques Lucke
9a78d523b0 Fix: matrices were printed in transposed order in some tooltips 2024-04-11 17:27:24 +02:00
Jeroen Bakker
9c1cba528b OpenGL: Remove Apple specific workarounds
This PR removes apple specific OpenGL workarounds. OpenGL on Apple isn't supported
so they can be removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/120522
2024-04-11 17:25:21 +02:00
Michael Kowalski
65748260f9 Fix: USD: animated primvar import
Fixed bug preventing update of time varying attribute values when
reading USD meshes with the mesh sequence cache modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/120500
2024-04-11 17:22:44 +02:00
Jacques Lucke
f771f83029 Geometry Nodes: better support for tiny triangles in reverse uv sampling
The reverse uv sampling operation generally fails when there the sample position
is within more than one uv triangle. Unfortunately, the combination of limited
floating point accuracy and very small triangle areas caused this case
sometimes, even if the triangles don't actually overlap. This happens relatively
rarely, but if it does, it causes annoying artifacts. The solution is to only
detect these kinds of overlapping triangles if they have a certain minimum size
and to be more relaxed otherwise.

Pull Request: https://projects.blender.org/blender/blender/pulls/120408
2024-04-11 17:15:55 +02:00
Aras Pranckevicius
dfb774213d Fix #120488: PLY importer crashes on degenerate (1 or 2 vertex) faces
Make it match behavior of the previous Python importer: it was
accepting such faces, and then always calling mesh validation function
that got rid of them. Instead of doing the whole validation cost,
just do not add such faces in the first place.
2024-04-11 17:21:33 +03:00
Hans Goudey
3d1bf4eb74 Fix: Properly free/allocate non-trivial shrinkwrap cache struct
Mistake in 0b80d5e755

Pull Request: https://projects.blender.org/blender/blender/pulls/120527
2024-04-11 16:15:18 +02:00
Ray molenkamp
db875033f3 makesdna/rna: cleanup duplicated translation units
Historically makesdna/rna did not link bf_guardedalloc for
some reason, but during one of my cmake cleanups have picked up
this dependency anyhow. To prevent duplicate symbols, remove the
now duplicated translation units as linking bf_guardedalloc has
seemingly not caused any issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/120490
2024-04-11 16:08:50 +02:00
Sybren A. Stüvel
f9890fd98d Anim: fix animation paths when renaming bone collections
Bone collections are drawn in the new tree view by accessing properties
from `armature.collections_all[...]`, which means that drivers and
fcurves also target those. This is now taken into account when updating
the bone collection name.

For context: in Blender 4.0 the UIList used `.collections[...]` instead,
for which renaming was already handled properly.

Pull Request: https://projects.blender.org/blender/blender/pulls/120517
2024-04-11 15:40:59 +02:00
Sybren A. Stüvel
ded8c5d6e6 Fix #120447: Anim/Drivers on Bone Collections created in 4.0 break in 4.1
Use versioning code to change Drivers & F-Curves targeting
`armature.collections[...` to target `armature.collections_all[...`
instead. The former contains the root collections only, whereas the
latter contains all of them in a flat list. Not only does this fix the
tree view (it binds to properties via the `.collections_all` RNA path),
but also this makes the drivers & animation of the properties work even
when the hierarchy changes.

Note that both `.collections` and `.collections_all` give access to all
bone collections. The former just requires iterating hierarchically,
that is, via `some_collection.children`.

Pull Request: https://projects.blender.org/blender/blender/pulls/120514
2024-04-11 15:26:47 +02:00
Jason Fielder
be32bc5b72 Metal: Add AMD support for subpass transition
Adds support for subpass transition for AMD/Intel IMR
GPUs. This enables correct functioning of EEVEE Next
deferred lighting pass on AMD platforms.

The emulation is consistent with the OpenGL approach
of generating additional texture bindings in the shader
for subpass inputs, and splitting render passes across
sub-pass boundaries.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/119784
2024-04-11 15:23:53 +02:00
Iliya Katueshenock
4049309071 Fix: Geometry Nodes: GP3 component in tooltip without experimental option ON
Do not display this GP component in tooltip for some nodes which is support this.

Pull Request: https://projects.blender.org/blender/blender/pulls/120525
2024-04-11 15:21:04 +02:00
YimingWu
e7e3767056 Fix #120457: interpolating curves ignores cyclic attributes
`interpolate_curve_attributes()` did not transfer `cyclic` attribute to
target curves. This fixes the the problem and allows Interpolate
Curves node to interpolate cyclic curves and also work between a cyclic
curve and a non-cyclic curve.

Pull Request: https://projects.blender.org/blender/blender/pulls/120460
2024-04-11 15:12:13 +02:00
Jacques Lucke
549d02637a Curves: add menu to add some primitive curves in edit mode
This adds operators to add a bezier and circle primitive in curves
edit mode. The operators support the same settings as in the
legacy curve edit mode. The `shift+A` shortcut is added as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/120513
2024-04-11 15:11:02 +02:00
Iliya Katueshenock
a03c3d16d8 Fix: Ensure null terminator for TIP_ string
Make sure TIP_ function will be called for string with null terminator.

Pull Request: https://projects.blender.org/blender/blender/pulls/120524
2024-04-11 14:59:57 +02:00
Philipp Oeser
2f67c45b65 Fix: renaming an ID does not properly update actions in the NLA
`BKE_animdata_fix_paths_rename` would tag the owner ID itself
(`ID_RECALC_SYNC_TO_EVAL`) upon renaming when a corresponding fcurve was
found/fixed, however the action itself wasnt tagged. "The action is an
own datablock, meaning, changes to f-curves need to copy those changes
to all evaluated versions of the action datablock" (wording from
4045730d58).

(this is also the reason the action would "fix" itself after entering
tweakmode on it in the NLA, since that ripples down to
`ANIM_list_elem_update` -- which does the tagging on the action then).

Part of #104055

Pull Request: https://projects.blender.org/blender/blender/pulls/120292
2024-04-11 14:32:14 +02:00
Sergey Sharybin
168f3beb16 Fix #120463: Slow evaluation of disabled modifier pointing to a collection
Collections which were pointed by a modifier used to follow visibility of the
current object, and this visibility is static throughout the lifetime of the
dependency graph.

Change the code so that collections pointed by modifiers rely on the visibility
flushing, allowing to be optimized out from evaluation.

Pull Request: https://projects.blender.org/blender/blender/pulls/120516
2024-04-11 14:20:31 +02:00
Pratik Borhade
a656ce5c16 UI: Remove active vertex theme option for 3d view and UV editor
`editmesh_active` theme is used to for active mesh element.
`vertex_active` is unused here (only used in graph editor) so remove it
from the 3d viewport and UV editor theme.

Found this in #119640

Pull Request: https://projects.blender.org/blender/blender/pulls/119649
2024-04-11 13:19:06 +02:00
Pratik Borhade
341af348d9 Fix #120461: Outliner: Clicking Collection icon does not switch Properties tab
This is due to missing case for layer collection in `outliner_set_properties_tab`

Pull Request: https://projects.blender.org/blender/blender/pulls/120464
2024-04-11 13:00:13 +02:00
Lukas Tönne
483802b62d GPv3: Cleanup: Rename keymap functions to gpencil_legacy
This should reduce the confusion a bit when more GPv3 keymaps are added
using the `grease_pencil` prefix.

Pull Request: https://projects.blender.org/blender/blender/pulls/120506
2024-04-11 12:56:17 +02:00
Campbell Barton
3a8cceee7d Cleanup: remove redundant checks & assignments 2024-04-11 20:47:07 +10:00
Campbell Barton
271aedffbe Cleanup: quiet missing-declarations warning 2024-04-11 20:19:01 +10:00
Campbell Barton
7e5a6d8dd5 Cleanup: correct argument order & naming
Correct swapped arguments, no functional changes.
2024-04-11 20:19:01 +10:00
Clément Foucault
00f4c9cbec Fix: EEVEE-Next: GLSL Compilation missing saturate declaration 2024-04-11 12:17:49 +02:00
Clément Foucault
b4bc96cc41 Cleanup: EEVEE-Next: Move light clamping out of volume_light 2024-04-11 11:51:58 +02:00
Clément Foucault
969af3e8be Cleanup: EEVEE-Next: Change clamping function to allow negative values
And also simplify the code.
2024-04-11 11:51:58 +02:00
Jacques Lucke
183ac7d2a2 Fix: update auto bezier handles after toggling cyclic 2024-04-11 11:50:35 +02:00
Christoph Lendenfeld
fb22ee6f0c Refactor: BeztMap Array to C++ Vector
Instead of using `MEM_callocN` to create an array of `BeztMap`
use a `blender::Vector`. This has the advantage that we don't need to worry about
freeing the memory.
In addition to that it can be passed as a `Span`, removing the need to pass the
length as a separate argument.
Doing that also allows to use the C++ syntax for `for` loops.

This also gives a small performance boost
| Before | After |
| - | - |
| 288ms | 260ms |

Pull Request: https://projects.blender.org/blender/blender/pulls/120507
2024-04-11 11:47:15 +02:00
Christoph Lendenfeld
8ea7d44e62 Fix #120470: Keying Set export fails in python
Caused by 30b0c5b225
That commit removed `use_insertkey_xyz_to_rgb` but
I didn't see the use of that in the python script.
Fixed by removing the usage of that property from the python script as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/120509
2024-04-11 11:15:28 +02:00
Jeroen Bakker
c15e5116ab Vulkan: MoltenVK Support for Developers
MoltenVK original intent was to let developers work on a mac system developing
for the vulkan eco-system. MoltenVK doesn't support all the features that we
require and would require additional workarounds to be actually supported.

It is not expected that we will release Blender with MoltenVK for this reason.
But it still has value for shader developers to validate shaders on metal and
vulkan on a single platform.

![image](/attachments/9a4a9904-a5f6-4922-896d-744dfb78244c)

Pull Request: https://projects.blender.org/blender/blender/pulls/117940
2024-04-11 11:04:43 +02:00
Jason Fielder
fc68a05e7e EEVEE Next: Specialize additional film parameters
Specializing other frequently used film parameters
results in an additional ~20% uplift in film pass
performance. Measured on Apple Silicon.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/119736
2024-04-11 10:58:17 +02:00
Sergey Sharybin
56cbde568b Fix #120046: Broken render on AMD Metal GPUs
This is a regression since fdc2962beb

The size of state can not be different between CPU and GPU.

This change replaces compile-time condition with a kernel feature
check, which solves the render regression on AMD Metal. It also
minimizes the state size on other GPUs when Light Tree is disabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/120476
2024-04-11 10:51:45 +02:00
Jason Fielder
5753a27624 Metal: Disable usage attachment for atomic buffer textures
Removes the implicit USAGE_ATTACHMENT flag from
atomic fallback textures which are buffer-backed.
This usage flag results in a validation failure, and is
not required by these textures as they are cleared
via the backing buffer.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/119785
2024-04-11 10:46:20 +02:00
Aras Pranckevicius
1ea014112b Fix #120253: Batch export of STL files incorrectly handles .stl suffix
It was mostly correct, except for the case where a user sets an
empty string as the export filename. What was happening is:
- STL exporter invocation adds ".stl" extension, so the path becomes
  foo/.stl
- Code tries to replace extension with "ObjectName.stl", but
  BLI_path_extension_replace sees that the filename part starts with
  a dot and thinks the ".stl" part is the whole filename, not the
  extension
- Resulting path thus becomes "foo/.stlObjectName.stl"
2024-04-11 11:07:55 +03:00
Campbell Barton
793b99ca7c Theme: ensure unique theme names, increase name size to 64
Ensure unique names when setting the name and with versioning.
2024-04-11 17:44:27 +10:00
Campbell Barton
adbec9eea9 Theme: reset the default theme fails & fix invalid ListBase links
If the theme's name was changed, resetting the default theme did
nothing from a user perspective.

Internally it would add the Default theme to the end of the list where
it was ignored, then the default theme overwrote the data including the
next/prev links causing the ListBase to be invalid.

Resolve by ensuring the default theme is always first and use the
MEMCPY_STRUCT_AFTER macro to prevent links being overwritten.
2024-04-11 17:44:27 +10:00
Campbell Barton
182f1746b7 Theme: reset the theme to the default when removing a preset
It's strange to keep the theme displayed after its removal.
2024-04-11 17:44:27 +10:00
Campbell Barton
962d2ca6a6 Cleanup: use a const ListBase argument to BLI_uniquename
The list-base isn't manipulated, only the link argument.
2024-04-11 17:44:27 +10:00
Campbell Barton
28381e6c93 Cleanup: remove unused RenderProfile DNA struct 2024-04-11 17:44:27 +10:00
Campbell Barton
a70f667f8b Cleanup: pass args by reference instead of value in mesh_boolean.cc 2024-04-11 17:44:27 +10:00
Campbell Barton
09ee8d97e6 Cleanup: use C-style comments for descriptive text 2024-04-11 17:44:27 +10:00
Campbell Barton
c666f55940 Linux desktop spec: remove "game engine" keyword
It seems this was overlooked when the game-engine was removed.
2024-04-11 17:43:38 +10:00
Campbell Barton
3a30e80f60 UI: don't translate user defined names 2024-04-11 17:43:36 +10:00
Lukas Tönne
658a9ac3a9 GPv3: Initial sculpt mode
Adds an (empty) sculpt mode for Grease Pencil v3 objects.

The object `SCULPT_GPENCIL` mode is re-used for Grease Pencil object
types. A `SCULPT_GREASE_PENCIL` context mode has been added, which is
specific to grease pencil objects. This is necessary for polling tools
and keymaps.

Pull Request: https://projects.blender.org/blender/blender/pulls/119338
2024-04-11 09:39:48 +02:00