Geometry Nodes: link to output inside node group is invalid when created from Python #105619
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
Asset Browser Project
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#105619
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
System Information
Operating system: Linux-5.19.0-35-generic-x86_64-with-glibc2.36 64 Bits
Graphics card: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.161.03
Blender Version
Broken: version: 3.5.0 Beta, branch: blender-v3.5-release, commit date: 2023-03-09 18:49, hash:
4912695e0004
Worked: 3.4.1, branch: blender-v3.4-release, commit date: 2022-12-19 17:00, hash:
rB55485cb379f7
Short description of error
When using Python to create a new link between a node and a new socket in a Group Output node, the resulting link is invalid.
Exact steps for others to reproduce the error
Valid: False
.This issue breaks the Lazy Connect feature from Node Wrangler.
Reported by @genesis2303 in blender/blender-addons#104470.
Hello. API changes. The creation of a new socket should now be explicitly done by the user.
It's just as close to #105283 (although it doesn't seem to be a duplicate)
I see, thanks!
I believe this issue should be looked at again. I don't think it is a purposeful api change.
@benrugg https://wiki.blender.org/wiki/Reference/Release_Notes/3.5/Python_API#Node_Group_Input_Output_Creation_with_virtual_sockets
I don't know if I'm in the right section for this, but I hope to be of help to the Blender and Addon developer community 😊
From the wiki page: https://wiki.blender.org/wiki/Reference/Release_Notes/3.5/Python_API#Node_Group_Input_Output_Creation_with_virtual_sockets
I think this is a little mistake, It is not possible to recreate the same socket automatically as it happened before:
Using node_tree.inputs.new() or node_tree.interface.new_socket() We would not have access to the Min or Max Value of the node socket (Blender Standard) to which we want to connect the link!
For example i want to create the same socket of the "Metallic" from Principled BSDF, in order to connect from a new socket from "Group Input" node to the
bsdf.inputs['Metallic'] as metallic_input
Even knowing that the minimum value is 0.0 and the maximum value is 1.0, the nodes are constantly evolving and we would have no way of having compatibility with future versions, so in this case we do not have access to the minimum and maximum value of the Principled BSDF node of the Metallic socket
In my opinion
This is the real problem and I would like to underline it to bring it to your attention, there no longer seems to be a method to recreate a socket with the same properties without knowing the properties of all the sockets (And that's only visually, not at the API level!), whereas before this was set instantly as soon as it was connected to the socket 'CUSTOM' with links.new().
This means that you have to manually check the sockets of each Blender Node, and it doesn't really seem like a smart practice
makes managing addons really complicated. They used these APIs quite simply.
There seems to be no alternative way to get back to doing what was previously possible.
I apologize again if I'm not in the right section, and if possible please consider this issue seriously, as an addon developer this is a big obstacle.
@Andrew_D Hi, I think this is a valid concern.
A new API was introduced in 3.6,
bpy_extras.node_utils.connect_sockets(input, output)
(!105975). It has the advantage that it handles the connections to or from virtual sockets.However, it doesn’t currently copy the expected properties (min, max, default value, etc.). I’m trying to solve this but it looks like some information is not exposed to Python, such as the socket’s min and max values so I couldn’t find a way to do it in a reliable way yet.
I think the
bpy_extras.node_utils.connect_sockets(input, output)
not Working into Blender 4.0, try to connect Group Inputs.outputs Custom Socket to Gamma Inputs 'Gamma'Indeed, I just opened !113630 to try and fix that! But I’m not sure my fix is good enough.