Commit Graph

115604 Commits

Author SHA1 Message Date
Hans Goudey
cec874fed2 Fix: Add missing translation for UI text 2024-12-05 21:31:26 -05:00
Hans Goudey
f7089519e0 Cleanup: Remove unused UI function declaration 2024-12-05 21:31:25 -05:00
Harley Acheson
7c3db55b29 Refactor: Simplify Block Re-centering
PR #129125 allowed the movement of centered dialogs, like About and
Splash, without them snapping back to their original positions. But
that change was more complex than necessary. This returns
interface_region_popup.cc to exactly as it was before any of this, and
interface.cc gets simpler too. In a nutshell recentering these dialogs
is a lot easier that seemed at first.

Pull Request: https://projects.blender.org/blender/blender/pulls/131464
2024-12-06 00:57:32 +01:00
Sean Kim
9b9da3e5af Fix: Mesh Filter undo panel not undoing previous change
The `exec` callback was missing a call to `undo::push_end`, meaning that
using the undo panel would not undo the prior step, causing an
accumulative effect.

Pull Request: https://projects.blender.org/blender/blender/pulls/131466
2024-12-06 00:45:21 +01:00
Clément Foucault
52463a5f0b GPU: Remove unused GPUDrawList API
This was only used by the legacy draw manager.
This one has already been removed.
2024-12-05 23:26:29 +01:00
Clément Foucault
3e9a2fbf23 Cleanup: Formating 2024-12-05 23:17:44 +01:00
Clément Foucault
994c43413a Metal: Remove SSBO Vertex Fetch
This API was used as a workaround to the lack of
geometry shader. It has been rendered redundant
since the introduction of #125782.
2024-12-05 22:58:52 +01:00
Sean Kim
8d9bf47ba6 Sculpt: Prevent entering mode when object is invisible
This is already prevented in the UI in both the top left mode selector
and the pie menu, this commit adds an actual check to avoid being put
into an invalid state by another operator or script.

Pull Request: https://projects.blender.org/blender/blender/pulls/130769
2024-12-05 22:48:20 +01:00
Clément Foucault
35c393acd6 Cleanup: DRW: Remove legacy resource handle
Pull Request: https://projects.blender.org/blender/blender/pulls/131456
2024-12-05 22:28:33 +01:00
Clément Foucault
db12edd825 Cleanu: DRW: Remove unused types 2024-12-05 22:27:38 +01:00
Clément Foucault
e2fb51b2e8 DRW: Remove legacy object data 2024-12-05 22:27:38 +01:00
Clément Foucault
897d24d193 DRW: Remove legacy view layer attribute support 2024-12-05 22:27:38 +01:00
Clément Foucault
35beef96fd DRW: Remove legacy DRWPass structures and storage 2024-12-05 22:27:38 +01:00
Clément Foucault
459c65f993 Cleanup: DRW: Remove legacy object attributes 2024-12-05 22:27:38 +01:00
Clément Foucault
04282ef91e DRW: Remove draw lists 2024-12-05 22:27:38 +01:00
Jacques Lucke
7bd120955b Nodes: use topology cache directly for is_linked property in Python
Not sure if this makes a practical difference currently. However, it's good
to avoid depending on `SOCK_IS_LINKED` which is phased out more and more.

The topology cache should always be more up to date.
2024-12-05 20:49:55 +01:00
Hans Goudey
2a8f671070 Cleanup: Formatting 2024-12-05 14:47:59 -05:00
Jacques Lucke
680dbe70ae Fix: Nodes: use name as fallback for socket identifiers
This was probably accidentally broken in 7348e670b3.
2024-12-05 20:28:27 +01:00
Jacques Lucke
36b7cda4db Fix #89109: missing node tree update when NodeSocket.enabled is changed 2024-12-05 20:17:31 +01:00
Clément Foucault
568d45a90d Cleanup: Overlay: Remove global DST access through DRW_text_cache_ensure 2024-12-05 20:03:10 +01:00
Clément Foucault
9c7e18f515 DRW: Remove legacy state tracking
Fixes assert caused by uninitialized memory.
2024-12-05 20:03:10 +01:00
Clément Foucault
f9107c4f25 DRW: Remove legacy instance buffers
No functional change expected.
2024-12-05 20:03:10 +01:00
Clément Foucault
7271a6d7f9 DRW: Remove draw_manager_exec.cc
This moves the state reset to be done by
the `StateSet` command.
2024-12-05 20:03:10 +01:00
Clément Foucault
bcf297d971 Cleanup: DRW: Remove unused code 2024-12-05 20:03:10 +01:00
Clément Foucault
d8ca7dc743 DRW: Remove legacy DRWView
No functional change expected.
2024-12-05 20:03:10 +01:00
Clément Foucault
490cc5d011 DRW: Remove legacy clipping API
No functional change expected.
2024-12-05 20:03:10 +01:00
Clément Foucault
2a2c125301 DRW: Fix memory leak 2024-12-05 20:03:10 +01:00
Clément Foucault
ad770b0359 DRW: Remove more DRWView getters
No functional change expected.
2024-12-05 20:03:10 +01:00
Clément Foucault
1f9ecca872 DRW: Remove DRW_view_*mat_get
No functional change expected.
2024-12-05 20:03:10 +01:00
Clément Foucault
880d7170a2 DRW: Remove DRW_view_default_set/get and DRW_view_set/get_active
No functional change expected. But rendering is likely broken since
default view is not set the same way.
2024-12-05 20:03:10 +01:00
Clément Foucault
6e12cce8a6 DRW: Move offset data computation to View to use it with select_engine
This avoid code duplication.
2024-12-05 20:03:10 +01:00
Aras Pranckevicius
48c1157a41 Cleanup: compiler warning fix
size_t argument is %zu, not %zi
2024-12-05 20:31:15 +02:00
Falk David
949a7e6a60 Fix: Grease Pencil: Separate by Selection issues
Issues with the "Separate by selection" operator. Reported by the Blender studio.
There were multiple problems in this code.
1. When a new object is created, the parameters are not copied.
2. When a new layer in a new object is created, the parameters are not
   copied.
3. The code to transfer the layer attributes was not working correctly.

Fixed all the issues above. The layer attributes are now transfered once
after all layers have been added.

Pull Request: https://projects.blender.org/blender/blender/pulls/131449
2024-12-05 18:18:50 +01:00
Jacques Lucke
b36bf15e28 Geometry Nodes: improve detecting data-block dependencies
Previously, the data-block dependencies were always detected in
`update_depsgraph` in `MOD_nodes.cc`. This would only be called when something
called `DEG_relations_tag_update` before. We don't want to trigger a depsgraph
rebuild after each operation in the node editor, as that would be expensive.
However, that also meant that we often had to add data-block dependencies that
are not actually used, but might be used if the user changed e.g. a link. A
typical example for that is a object socket that has a default value, but the
socket is also linked.

Now, the dependencies referenced by the node tree are collected by the node tree
update code which runs after all changes. This way we can detect whether the
dependencies have changed. Only if they have changed, a depsgraph rebuild is
triggered. This now allows also taking into account the mute status of nodes and
whether an input is linked.

There are still more things that could be taken into account. Most obviously
whether a node is connected to an output. This can be done later. The most
tricky aspect here is probably that we also have to consider all viewer nodes as
output, because at the time the node runs, it's not known which viewer will
actually be used (which depends on other editors).

This also cleans up some special cases we had for e.g. the scene time node where
we always had to trigger a depsgraph rebuild when it was added/removed because
of its time dependence. This is now part of a more general system.

This fixes #109219.

Pull Request: https://projects.blender.org/blender/blender/pulls/131446
2024-12-05 18:02:14 +01:00
Harley Acheson
0e1313483a Fix #99157: Allow Shortcut on Auto Keyframe
If toggling the status of the Auto Keyframe button with a custom
keyboard shortcut it does not update and display the current status of
the button - it looks like nothing has changed.  This PR just updates
the button correctly when used this way. Just the addition of a
RNA_def_property_update.

Pull Request: https://projects.blender.org/blender/blender/pulls/131406
2024-12-05 17:27:18 +01:00
Christoph Lendenfeld
0ce1aa9ecd Fix #131198: Add missing redraw for ND_KEYFRAME_PROP
Tag Properties editor for redraw when it gets notification of
NC_ANIMATION | ND_KEYFRAME_PROP.

Pull Request: https://projects.blender.org/blender/blender/pulls/131440
2024-12-05 17:24:17 +01:00
Jonas Holzman
6cd33510c3 Nodes: Expose Node Color Tag to the Python API
This commit adds a new `color_tag` read-only enum property to nodes,
expanding on the existing node group `color_tag` property. The existing
node group color tag enum (`NodeGroupColorTag`) was renamed to the more
generic `NodeColorTag` and expanded to support all possible color tags.
This new property also works on node group nodes with custom color tags
set by the user.

Pull Request: https://projects.blender.org/blender/blender/pulls/131101
2024-12-05 17:14:34 +01:00
Omar Emara
6dd2ad061f Compositor: Optimize pixel access in new CPU compositor
Optimize pixel access in the new CPU compositor by specializing pixel
load and store for the type of the result that is being loaded or
stored. Gives up to 10% improvement.

Pull Request: https://projects.blender.org/blender/blender/pulls/131441
2024-12-05 16:55:06 +01:00
Jacques Lucke
54111b4f08 Fix: Geometry Nodes: missing update tag after data-block drag&drop 2024-12-05 16:40:11 +01:00
Aras Pranckevicius
4343796050 Fix #78046: When adding content with too long file names to VSE, show error instead of silently not working
VSE can support file basenames of only up to 256 characters length (due
to limited capacity of StripElem::filename). When adding e.g. a movie
that has a longer file basename, it was silently truncating it. The
strip was added, it was just not actually working due to truncated
file basename. Instead of that, log actual error and fail the addition
operator.

The issue repro with "not working" file has basename of 351 length
(due to lots of "invisible zero width space" characters).

Pull Request: https://projects.blender.org/blender/blender/pulls/131417
2024-12-05 16:38:59 +01:00
Aleš Jelovčan
478caef5cf Fix #130262: Grease Pencil: Merge layers node skips copying properties
The "Merge Layers" node creates a new `GreasePencil` as the result
but forgot to copy the Grease Pencil parameters.

Pull Request: https://projects.blender.org/blender/blender/pulls/130273
2024-12-05 16:02:55 +01:00
YimingWu
9e72f28823 Fix: Grease Pencil: Show menu when invoking Move to Layer operator
The Move to Layer operator in grease pencil edit mode when invoked from
operator search directly will not show menu correctly, instead it tries
to execute directly without a target layer name set. This fix ensures
that when it happens the UI would show a menu instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/131437
2024-12-05 15:42:51 +01:00
Jacques Lucke
eb65699715 Fix: USD: missing node tree update tag after import 2024-12-05 15:28:26 +01:00
Sybren A. Stüvel
81beebe4b8 Fix #131299: Grease Pencil: Moving keyframes doesn't update viewport
Grease Pencil animation data is stored in the object-data, not the
`AnimData` of the Grease Pencil ID. This meant that the object was
not properly tagged for an update, because the code assumed that
the object had an `adt`.

The fix calls `ANIM_id_update` to directly tag the Grease Pencil
ID for an update (which will also update the Grease Pencil frames
animation data).
2024-12-05 15:00:03 +01:00
Sybren A. Stüvel
036551c6a0 Refactor: Anim, simplify legacy Action versioning code
Simplify the code:

- Pull a lambda function out of a `for`-loop (making it clearer that the
  loop itself is pretty simple), and
- move the `ActionUserInfo` struct into the only function that uses it.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/131424
2024-12-05 14:51:45 +01:00
Sybren A. Stüvel
56f756b52c Refactor: Anim: simplify embedded IDs when versioning Actions
Change how we visit embedded IDs. Apparently using
`BKE_library_foreach_ID_link()` to get those IDs is not the right way to
go.

Currently the only animatable embedded IDs are node trees, so now the
code just handles those explicitly. Since this is versioning code,
there's also very little chance that there will be new types of
animatable embedded IDs before 4.4 gets released.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/131424
2024-12-05 14:51:36 +01:00
Hans Goudey
77af97d5b9 Cleanup: Move some blenlib files to C++
Pull Request: https://projects.blender.org/blender/blender/pulls/131319
2024-12-05 14:36:01 +01:00
Jeroen Bakker
55495b6224 Vulkan: Hide devices of failing drivers
Devices reported by failing drivers were still part of the device
selection list. When selected they would never be picked.

This change hides these devices from the UI

Pull Request: https://projects.blender.org/blender/blender/pulls/131431
2024-12-05 13:29:55 +01:00
Jacques Lucke
4fd49ae9f3 Fix #119341: improve propagating node tree interface settings
Copy the interface socket directly which makes sure that all relevant data is passed on.
The default is still adapted from the current socket value.

There are still places that could be improved that are not covered by this patch yet.
For example creating a group from a Set Position node changes the default Position input.
That could be fixed separately.

I removed one `assert` that did not seem important. It was making sure that an interface
item is only copied within a group, but I don't see a reason for why it should not be possible
to copy an item to a different group.

Pull Request: https://projects.blender.org/blender/blender/pulls/131394
2024-12-05 13:15:51 +01:00
Jonas Holzman
a730d5f8ba Nodes: Change Compositing Switch node class from Layout to Converter
Currently, the Layout node class is used by the Reroute, Frame and
Compositing Switch node. To bring more uniformity, and clear up the use
of each class, this commit moves the Compositing Switch node from
the Layout class to the Converter class. This aligns it with similar
nodes (Compositing Split, Compositing Switch View, Geometry Switch)
which use the same class, and limits the Layout class to layout-related
nodes. On the UI side, this also gives the Compositing Switch node a
more relevant header color.

Pull Request: https://projects.blender.org/blender/blender/pulls/131392
2024-12-05 13:13:05 +01:00