Compositor nodes-rerouting #28443

Closed
opened 2011-08-31 09:43:26 +02:00 by Jeroen Bakker · 7 comments
Member

%%%===== Proposal =====

This proposal is a UI enhancement on the node editor to allow better workflow with large node systems.

Noodle line

By using MouseClick-SHIFT on a noodle a point will appear. The user can positioned this point (Reroute point).
This point can attach noodles at North, South, East, West
An arrow will be drawn on noodles between two reroute points
If noodles reach a certain length, an arrow will be drawn. This way users can see the direction of the line.
Every point can have multiple outputs. Eg you can add multiple points this way if you can connect the Combined socket of the renderlayer to other nodes in a structured way.

Current patch is limited to the compositor node tree.

http://www.youtube.com/watch?v=l_gyLt-TAzk

Impact

DNA

There is a new NODE_FLAG and SOCK_FLAG called NODE_REROUTE and SOCK_REROUTE. telling the UI that it need to draw differently.

UI
The point is a special node, "RerouteNode". All nodetree will have one. it will be in a new submenu named "Helper" in the add node menu. This sub-menu will not be visible on screen.

Operators

a new operation will be added where the user can click on a line holding a certain key and this will add a RoutingNode in that position.

drawnode.c

For the RoutingNode a new function is introduced to draw the node.
When drawing bNodeLink that is connected to a routingnode a different algorithm will be used for drawing the bezier.

If the distance traveled on the x-axis is longer than the y-axis the link will be connected to the east or west of the node. If the y-axis is longer it will be the north of south.

When it is connected to the north of source, the bezier will be adjusted to draw it correctly.

When a line will be between two reroute nodes, an arrow will be draw on the line. This way the user know where the line is heading to.

nodes/???_

All node types will get a RerouteNode. currently only the compositor will get one.
A rerouting node contains one input socket and one output socket and uses pass buffer to pass the data to the next node
%%%

%%%===== Proposal ===== This proposal is a UI enhancement on the node editor to allow better workflow with large node systems. **Noodle line** By using MouseClick-SHIFT on a noodle a point will appear. The user can positioned this point (Reroute point). This point can attach noodles at North, South, East, West An arrow will be drawn on noodles between two reroute points If noodles reach a certain length, an arrow will be drawn. This way users can see the direction of the line. Every point can have multiple outputs. Eg you can add multiple points this way if you can connect the Combined socket of the renderlayer to other nodes in a structured way. Current patch is limited to the compositor node tree. http://www.youtube.com/watch?v=l_gyLt-TAzk **Impact** **DNA** There is a new NODE_FLAG and SOCK_FLAG called NODE_REROUTE and SOCK_REROUTE. telling the UI that it need to draw differently. **UI** The point is a special node, "RerouteNode". All nodetree will have one. it will be in a new submenu named "Helper" in the add node menu. This sub-menu will not be visible on screen. ### Operators a new operation will be added where the user can click on a line holding a certain key and this will add a RoutingNode in that position. ### drawnode.c For the RoutingNode a new function is introduced to draw the node. When drawing bNodeLink that is connected to a routingnode a different algorithm will be used for drawing the bezier. If the distance traveled on the x-axis is longer than the y-axis the link will be connected to the east or west of the node. If the y-axis is longer it will be the north of south. When it is connected to the north of source, the bezier will be adjusted to draw it correctly. When a line will be between two reroute nodes, an arrow will be draw on the line. This way the user know where the line is heading to. **nodes/???_** All node types will get a RerouteNode. currently only the compositor will get one. A rerouting node contains one input socket and one output socket and uses pass buffer to pass the data to the next node %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Member

%%%Updated the patch to svn trunk (r40828) be compatible with the changes to nodes introduced in 2.59. New patch is in patch-reroutenoodles_2.txt.

Reroute nodes now have their own custom drawing and draw preparation (drawupdate) functions. This makes them a lot simpler and helps avoid cluttering default draw functions (node_update_basis/node_draw_basis) with type-specific code.%%%

%%%Updated the patch to svn trunk (r40828) be compatible with the changes to nodes introduced in 2.59. New patch is in patch-reroutenoodles_2.txt. Reroute nodes now have their own custom drawing and draw preparation (drawupdate) functions. This makes them a lot simpler and helps avoid cluttering default draw functions (node_update_basis/node_draw_basis) with type-specific code.%%%

%%%thanks for the patch, can you update to a current version?%%%

%%%thanks for the patch, can you update to a current version?%%%
Member

%%%I've updated the patch to latest trunk (r44879) and made some improvements to simplify the code and make it more generic.

  • Reroute nodes are now available in all tree types (previously only in compositor).

  • Instead of actual execution functions (which adds overhead), the reroute nodes are treated as proxies and removed before the actual execution in the localization phase. Like muted nodes they have a simple internal relink function (just connect the single input to output) and can be bypassed the same way.

  • The additional NODE_REROUTE and SOCK_REROUTE flags have been removed, these are not necessary and just add extra cases to check for. To avoid problems with auto-hidden sockets i've added another callback auto_hide_sockets to node types, which can be used to customize the way sockets are hidden when a node is collapsed (reroute node just ignores this). This can also be used in the future to make more usable auto-hiding feature, so nodes don't have to be un-collapsed every time to change links.

  • Draw functions for the reroute node have been cleaned up. Only the node socket is now draw for them, not the node body. The (invisible) size of the node has been increased to make grabbing with RMB easier (still could need some tweaking).%%%

%%%I've updated the patch to latest trunk (r44879) and made some improvements to simplify the code and make it more generic. * Reroute nodes are now available in all tree types (previously only in compositor). * Instead of actual execution functions (which adds overhead), the reroute nodes are treated as proxies and removed before the actual execution in the localization phase. Like muted nodes they have a simple internal relink function (just connect the single input to output) and can be bypassed the same way. * The additional NODE_REROUTE and SOCK_REROUTE flags have been removed, these are not necessary and just add extra cases to check for. To avoid problems with auto-hidden sockets i've added another callback auto_hide_sockets to node types, which can be used to customize the way sockets are hidden when a node is collapsed (reroute node just ignores this). This can also be used in the future to make more usable auto-hiding feature, so nodes don't have to be un-collapsed every time to change links. * Draw functions for the reroute node have been cleaned up. Only the node socket is now draw for them, not the node body. The (invisible) size of the node has been increased to make grabbing with RMB easier (still could need some tweaking).%%%
Member

%%%After test by and discussion with Sebastian, i implemented two more features:

  • The selection and tweak areas in nodes can now be customized by callback functions (default implementation uses the node->totr rect as before). The reroute node is very small (not much larger than the default tweak threshold), so it defines a bigger tweak area for comfortable grabbing with RMB.

  • Nodes can be removed automatically now by setting the NODE_REMOVE flag. This allows a node to safely trigger its own deletion. The actual removal happens in ntreeUpdateTree after all node updates are done. The reroute node uses this so it gets removed when completely unlinked (there is no additional info in this node beside connections, this keeps things tidy)%%%

%%%After test by and discussion with Sebastian, i implemented two more features: * The selection and tweak areas in nodes can now be customized by callback functions (default implementation uses the node->totr rect as before). The reroute node is very small (not much larger than the default tweak threshold), so it defines a bigger tweak area for comfortable grabbing with RMB. * Nodes can be removed automatically now by setting the NODE_REMOVE flag. This allows a node to safely trigger its own deletion. The actual removal happens in ntreeUpdateTree after all node updates are done. The reroute node uses this so it gets removed when completely unlinked (there is no additional info in this node beside connections, this keeps things tidy)%%%
Author
Member

%%%Has been committed to trunk%%%

%%%Has been committed to trunk%%%
Author
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
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
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#28443
No description provided.