Nodes: expose multi-input sockets to custom nodes in the Python API #114474
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#114474
Loading…
Reference in New Issue
No description provided.
Delete Branch "pioverfour/blender:dp_multi_input_socket_rna"
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?
Currently the multi-input sockets are not exposed to the custom nodes
Python API. This makes some features cumbersome to implement if one
wants a node to process an arbitrary number of inputs.
One workaround is to make inputs duplicate themselves when a link is
created, but a proper multi-input would be easier to use for both
add-on developers and users.
This commit exposes a new
use_multi_input
boolean parameter whencreating a new node socket. This makes it possible to declare a
multi-input, while still leaving the existing
is_multi_input
property read-only so that existing nodes cannot be made unstable.
The parameter is optional so existing scripts stay compatible. It also
raises an error when used on output sockets, since it makes no sense
for those to be multi-input.
The Custom Node Tree Python template was updated to reflect this
change by making one of the inputs of the custom node multi-input.
Previous attempts at this include D13449, D16011, and P3206, which is more similar to this PR.
The PR looks reasonable to me, a pretty small change, and it's nice that it's only exposed when adding a socket.
@HooglyBoogly Do you need someone else to review or can this be merged?
Best if Jacques takes a peek too, since we had talked about this in the past.
@blender-bot build
It looks like the build never completed.
@blender-bot build
Can you merge
main
?Done!
@blender-bot build