Node panels: Enable new node group interfaces #1

Closed
Lukas Tönne wants to merge 14 commits from node-panels-final into node-panels-rna

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

14 Commits

Author SHA1 Message Date
a837b068eb Check if child panels are allowed before trying to create them. 2023-08-21 15:48:58 +02:00
2cb1aa06ee Allow child panels in the interface root panel. 2023-08-21 15:48:58 +02:00
53c0a3ee04 Added a flag to control when a panel is allowed to contain other panels. 2023-08-21 15:48:58 +02:00
92b382f859 Cleanup: Fixed TODO comment. 2023-08-21 15:48:58 +02:00
74081c3b00 Added description and "default closed" flags to panel declarations. 2023-08-21 15:48:58 +02:00
5a19e46285 Extented drop down for adding sockets to quickly add input or output.
The socket added by the "Socket" drop down option was neither input nor
output, which is confusing. To get sensible defaults, the menu now has
separate "Input" and "Output" options.
2023-08-21 15:48:58 +02:00
a876ee9a6f 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.
2023-08-21 15:48:58 +02:00
ea3d85b9d7 Node panels: RNA for node group interfaces
Part 2/3 of #109135, #110272

Defines the RNA API for the new node tree interfaces.

The bulk of the RNA definition lives in `rna_node_tree_interface.cc`. The legacy socket interfaces remain in place and will be removed later.

Since the socket items share the `bNodeSocketValueXXX` structs with the `bNodeSocket` types they also use the same RNA. The `rna_def_node_socket_interface_subtypes` function is exposed so that when defining the interface RNA it can use the same code as the regular socket RNA.

Pull Request: blender/blender#110952
2023-08-21 15:40:19 +02:00
f052b18a65 Always clear 'fake user' flag from linked data.
Using this flag from linked data is always a double-edge sword, in one
end some user have been relying on it to keep around data that is not
really used as ID (like e.g. text data-blocks, node trees, see
e.g.  #103687, #105687). On the other end, it often causes over-keeping
of linked data reference in production files.

From now on, when an unused linked data is to be kept around, users
should create an ID property to reference it.

Implements #106321.

Pull Request: blender/blender#111042
2023-08-21 15:33:25 +02:00
7f65080ab4 Fix #111277: NaN in Vector Displacement leading to render errors
Fixes NaN in Vector Displacement node caused by the normalization of
0, 0, 0 vectors.

This fixes both visual rendering issues and an "illegal address" error
on the GPU. The "illegal address" error came from the Light Tree
Sampling code not handling the NaN normals well, leading to weird code
paths being taken, eventually leading to a kernel_assert and a
user facing illegal address error.

Pull Request: blender/blender#111294
2023-08-21 15:22:03 +02:00
8b311daf0a Cleanup: Make format 2023-08-21 15:03:43 +02:00
785e03b13f Cleanup: Reduce VKDebug Messenger Complexity
Reduces the complexity of VKDebug messenger_callback.
2023-08-21 15:03:33 +02:00
b3c7f3c8a9 UI: Add initial UI support for ID pointers custom properties.
Customprops to IDs are supported since years through code, but were
never exposed directly in the UI of customporperties.

This commit mainly:
* Adds a new `DATA_BLOCK` type to UI customprops types.
* Exposes the existing `id_type` settings to python API.

Pull Request: blender/blender#110458
2023-08-21 14:14:26 +02:00
b404df6989 Further tweaks to LSAN suppression rules.
Mainly add more python-related suppressions.

Also suppressed some reports from `pxr` (usd) libraries.

Now most tests are passing again with ASAN/LSAN on on my machine,
besides modifiers and geometry nodes ones, which often fail on a
mysterious `libstdc++.so.6+0xb259a` leak.
2023-08-21 14:07:16 +02:00