Commit Graph

5 Commits

Author SHA1 Message Date
Lukas Tönne 8a20bd4182 Test fix: Node groups outputs now placed before inputs
#113060 enforces output/input ordering of node group sockets.
The bf_node_group_interface test needs to be updated to reflect
these changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/113213
2023-10-03 17:24:12 +02:00
Lukas Tönne 354915cf3c Nodes: revert the inline (pass-through) socket feature
Inlined sockets in the same vertical space are no longer supported.
This removes `input_output` socket declarations, the inlining feature in
node drawing, and the `Both` option for node group interface sockets.

Versioning code splits existing node group sockets into individual
sockets again. Unfortunately some links may get lost in versioning files
using the feature, because of an unnoticed bug: Socket identifiers have
to be unique in the node group items list but inlined input/output
sockets have the same identifier. This still works for most situations
because uniqueness is only required within input/output lists. Creating
proper unique identifiers will discard any link from the previous output
socket. This cannot easily be fixed without `after_linking` versioning
code, which should be avoided.

Pull Request: https://projects.blender.org/blender/blender/pulls/112560
2023-09-22 16:56:59 +02:00
Lukas Tönne 742f3b233f Nodes: Rename `ui_items` property to `items_tree`
DNA names are unchanged, just affects the RNA API.

Resolves #112523

Pull Request: https://projects.blender.org/blender/blender/pulls/112527
2023-09-18 18:07:26 +02:00
Hans Goudey 1cfed92c84 Fix: Exception creating geometry node group or node group socket
c951464b8a didn't update the uses of the API.
2023-09-18 11:01:05 -04:00
Lukas Tönne e071288ab2 Nodes: Panels integration with blend files and UI
Part 3/3 of #109135, #110272

Switch to new node group interfaces and deprecate old DNA and API.
This completes support for panels in node drawing and in node group
interface declarations in particular.

The new node group interface DNA and RNA code has been added in parts
1 and 2 (#110885, #110952) but has not be enabled yet. This commit
completes the integration by
* enabling the new RNA API
* using the new API in UI
* read/write new interfaces from blend files
* add versioning for backward compatibility
* add forward-compatible writing code to reconstruct old interfaces

All places accessing node group interface declarations should now be
using the new API. A runtime cache has been added that allows simple
linear access to socket inputs and outputs even when a panel hierarchy
is used.

Old DNA has been deprecated and should only be accessed for versioning
(inputs/outputs renamed to inputs_legacy/outputs_legacy to catch
errors). Versioning code ensures both backward and forward
compatibility of existing files.

The API for old interfaces is removed. The new API is very similar but
is defined on the `ntree.interface` instead of the `ntree` directly.
Breaking change notifications and detailed instructions for migrating
will be added.

A python test has been added for the node group API functions. This
includes new functionality such as creating panels and moving items
between different levels.

This patch does not yet contain panel representations in the modifier
UI. This has been tested in a separate branch and will be added with a
later PR (#108565).

Pull Request: https://projects.blender.org/blender/blender/pulls/111348
2023-08-30 12:37:21 +02:00