Commit Graph

8 Commits

Author SHA1 Message Date
Damien Picard
90e2dfd2e3 I18n: Translate dynamic operator descriptions
The descriptions for `POSELIB_OT_asset_modify` and
`GEOMETRY_OT_execute_node_group` are dynamic. They were already
extracted, but the translation did not happen in the description
function.

This commit adds the appropriate `TIP_` translation macro.

Reported by Ye Gui in #43295.
2025-10-15 16:26:46 +02:00
Jacques Lucke
1260e90b4c Refactor: Geometry Nodes: simplify detection of syncable nodes
This moves most of the code to deal with syncable nodes (such as
Combine/Separate Bundle) to the nodes module. Over time it might be possible to
decentralize it more.

This also changes the caching mechanism from storing a flag on the node to
storing a map on the node editor runtime data. This simplifies the code quite
significantly and also removes the need to store any of this data in DNA.

The node tree update code now always clears this cache because before it was
missing many cases, e.g. when creating links that would connect a Combine to a
Separate Bundle node.

Pull Request: https://projects.blender.org/blender/blender/pulls/143661
2025-07-30 20:42:20 +02:00
Jacques Lucke
21ca4584b6 Geometry Nodes: show sync button on bundle and closure nodes if syncing is possible
This shows a sync button when Geometry Nodes has detected that
syncing is possible and might be necessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/140967
2025-07-30 18:51:14 +02:00
Jacques Lucke
f50699d80a Refactor: Geometry Nodes: use a single string identifier for closure/bundle items
Previously, we used `SocketInterfaceKey` as identifier for bundle and closure
items. It contained multiple identifiers (although only one was ever used so
far). The idea was that multiple identifiers could provide more flexibility.
E.g. an Evaluate Closure node could work with closures with slightly different
identifier names, or a bundle could be passed into different systems that expect
the same data but named differently.

The added complexity by allowing for this is greater than I anticipated even
though most places didn't even support multiple identifiers yet. In addition to
that, it seems like there may be simpler workaround for many situations where
multiple identifiers were supposed to help. E.g. one could just add the same
value to a bundle twice with different names or one can build a node group that
maps a bundle for one system to one for another system.

Overall, the complexity of `SocketInterfaceKey` didn't seem worth it, and we can
probably just build a better system when we don't allow multiple identifiers per
item.

Pull Request: https://projects.blender.org/blender/blender/pulls/142947
2025-07-23 21:26:51 +02:00
Jacques Lucke
55e2fd2929 Cleanup: unify naming for named constructors
Previously, we used an inconsistent naming scheme for such "named constructors".
Now it always uses `from_*`.

Pull Request: https://projects.blender.org/blender/blender/pulls/142175
2025-07-17 09:09:16 +02:00
Jacques Lucke
21d603895e Refactor: Geometry Nodes: support detection of syncable closure/bundle nodes
This is extracted from #140967.

Previously, it was possible to sync a bundle/closure node based on what's linked.
However, it was not possible to detect if the syncing was possible or necessary
in the first place. Knowing this helps building UI features that inform the user
about outdated nodes.
2025-07-02 07:38:30 +02:00
Jacques Lucke
72110757b6 Fix: Geometry Nodes: links removed after syncing bundle/closure nodes
This makes sure that sockets keep their old identifiers so that links remain intact.

Pull Request: https://projects.blender.org/blender/blender/pulls/140956
2025-06-25 09:55:00 +02:00
Jacques Lucke
e103d864c3 Geometry Nodes: add operator to sync sockets in bundle and closure nodes
Previously, the right sockets were already created on closure/bundle nodes when
link-drag-search is used. However, after initialization, there was no automatic
way to synchronize the sockets again after changes to one of the nodes. Instead
one had to copy the changes manually.

This patch adds a new operator that can automatically update the sockets on the
following nodes based on what is connected: Combine Bundle, Separate Bundle,
Closure (zone), Evaluate Closure.

The button is always visible in the side bar. In the future we may also want to
show it inside of the node when syncing is necessary. However, that's not done
in this patch. It's also a little bit tricky because detecting whether syncing
is necessary is not necessarily cheap (it requires traversing the tree including
going into nested node groups).

If no signature or conflicting signatures for the bundle or closure are found,
the operator does nothing. In this case, the user is currently responsible to
create/remove the sockets manually.

Pull Request: https://projects.blender.org/blender/blender/pulls/140449
2025-06-17 06:18:01 +02:00