Nodes: revert the inline (pass-through) socket feature #112560
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#112560
Loading…
Reference in New Issue
No description provided.
Delete Branch "LukasTonne/blender:nodes-revert-inline-sockets"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Inlined sockets in the same vertical space are no longer supported.
This removes
input_output
socket declarations, the inlining feature innode 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
versioningcode, which should be avoided.
@dfelinto Do we also want to remove the
Both
socket option (only allow single input/output sockets)? If we want to enforce strict outputs..inputs sorting these pass-through sockets become weird, the two sockets can be far apart.I haven't tested this but would this feature allow the following, this would be a shame to lose as it would allow users to reduce the amount of nodes they need to add.
@CharlieJolly No it doesn't work like that. The inlining is purely a UI feature, while "pass-through" is a description of intended functionality (but nothing enforcing how nodes use these).
Yes, it makes no sense to have the "Both" in this scenario. But I'm not sure I understand the point you are making (are you "pro" or against" removing the "Both"?)
Just for context, since this may be the first place people find about this.
The idea behind the inlined sockets was to provice an elegant way to get the nodes to be more compact. This topic is still on the agenda, but this particular solution has some shortcomes and wasn't widely well received.
The current (3.6) solution is based on the principles of "form-follow-function", where the function of the inputs/outputs is to be a list of parameters for the node. That was the original thought behind the compositor nodes design back in Elephants Dream day's.
Without the inlining i think it makes more sense to remove
Both
option as well. It generates alternating input/output atm and if we sort these the two sockets move even further apart, making it difficult to figure out which group socket declaration belongs to which pair of sockets.Will separate panels for Input and Output sockets come back as well? Without Inlined sockets there is no necessity for them, and separate panels helped with organization better I thought.
@Nika-Kutsniashvili having separate panels for input and outputs make it harder to drag the sockets around from/to different panels. Having them all on the same list facilitates that.
It seems like this patch contains many unrelated formatting changes.
Sorry, recent system update broke all the clang-format stuff on my machine again ... and then gitea hides the file will all the bogus changes from the diff by default :/
@blender-bot build
@ -1234,1 +1234,4 @@
}
/* Convert sockets with both input and output flag into two separate sockets. */
FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
This versioning code does break files that use the feature. Might be okay, but that should be an explicit decision that is also mentioned in the PR description.
Files break when the inlined interface sockets where linked to something else.
By "break files" i guess you mean it removes links? Because it may now generate a different identifier i guess. Could try and replicate what the socket identifiers would be to make that work.
I've added an explanation as to why node links may get discarded and why we don't want to version that.
@ -1235,0 +1236,4 @@
/* Convert sockets with both input and output flag into two separate sockets. */
FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
blender::Vector<bNodeTreeInterfaceSocket *> sockets_to_split;
ntree->tree_interface.foreach_item([&](bNodeTreeInterfaceItem &item) {
Feels like it might be nice not to rely on code that may change too much in versioning, but to stay closer to the actual data. Should be fine for now, but this may have to be rewritten at some point if the called code changes.
I added copying code for sockets without blenkernel calls here now. The fact that we don't need ID user count managing makes this a whole lot simpler than in blenkernel, all socket
default_value
data can be MEM_dupalloc'd.@ -1235,0 +1252,4 @@
bNodeTreeInterfacePanel *parent = ntree->tree_interface.find_item_parent(socket->item);
bNodeTreeInterfaceSocket *socket_copy = reinterpret_cast<bNodeTreeInterfaceSocket *>(
ntree->tree_interface.insert_item_copy(socket->item, parent, position + 1));
/* Original socket becomes output */
And comments with dot.
@ -255,3 +255,3 @@
if (parent == nullptr || parent == &root_panel) {
/* Panel is the root panel. */
return 0;
return root_panel.item_position(item);
Is this a bug-fix that should be committed independently?
Yes, fixed separately #112714