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.
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
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
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.
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