Custom nodes no longer get inserted in between two linked nodes #93438

Closed
opened 2021-11-27 22:27:35 +01:00 by Valera Barashkov · 13 comments

System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 496.49

Blender Version
Broken: version: 3.0.0 Release Candidate, branch: master, commit date: 2021-11-25 17:24, hash: 2fb8c6805a
Worked: 2.93 and 3.0 a few weeks ago (lost the build)

Short description of error
Using custom node trees would previously allow to drop a node in between two connected nodes. Now I see the link get highlighted but when I release the node it does not get inserted into that link.

Exact steps for others to reproduce the error
image.png

**System Information** Operating system: Windows-10-10.0.19042-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 496.49 **Blender Version** Broken: version: 3.0.0 Release Candidate, branch: master, commit date: 2021-11-25 17:24, hash: `2fb8c6805a` Worked: 2.93 and 3.0 a few weeks ago (lost the build) **Short description of error** Using custom node trees would previously allow to drop a node in between two connected nodes. Now I see the link get highlighted but when I release the node it does not get inserted into that link. **Exact steps for others to reproduce the error** ![image.png](https://archive.blender.org/developer/F12489878/image.png)

Added subscriber: @valera-8

Added subscriber: @valera-8
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Cannot reproduce here (at least not with the custom nodes from the custom_nodes.py python template.

Could you share a minimal example .blend file (including the necessary py script- [x]) that demonstrates this failure?

Cannot reproduce here (at least not with the custom nodes from the `custom_nodes.py` python template. Could you share a minimal example .blend file (including the necessary py script- [x]) that demonstrates this failure?

Added subscriber: @JoshuaKnauber

Added subscriber: @JoshuaKnauber

I guess one of the reports can be closed, but I provided an example with the python template here: https://developer.blender.org/T93430
The explanation of how to reproduce this with the custom node template is also given there:

When creating custom python nodes that have only custom sockets, the node can't be dropped onto an existing link. This is not the case if the node has normal blender sockets, only with custom ones. It also doesn't happen if the node has blender and custom sockets as the blender sockets will be connected and the custom ones ignored.

If I were to throw a wild guess out there why this is happening, I would say that it might have to do with a fix for the float curve node in geometry nodes being connected to the factor input instead of the value input. This was an issue for a while and seems to recently have gotten fixed. I would guess that this somehow looks for compatible sockets and that doesn't consider custom python sockets. I couldn't find the exact commit for this, but it might be a starting point for where to look.

I guess one of the reports can be closed, but I provided an example with the python template here: https://developer.blender.org/T93430 The explanation of how to reproduce this with the custom node template is also given there: > When creating custom python nodes that have only custom sockets, the node can't be dropped onto an existing link. This is not the case if the node has normal blender sockets, only with custom ones. It also doesn't happen if the node has blender and custom sockets as the blender sockets will be connected and the custom ones ignored. If I were to throw a wild guess out there why this is happening, I would say that it might have to do with a fix for the float curve node in geometry nodes being connected to the factor input instead of the value input. This was an issue for a while and seems to recently have gotten fixed. I would guess that this somehow looks for compatible sockets and that doesn't consider custom python sockets. I couldn't find the exact commit for this, but it might be a starting point for where to look.

@JoshuaKnauber @lichtwerk

I think Joshua figured it out, here is my script for the node, it uses custom float socket.

I can't share the entire script here, but I can email it if you like.

Node UI

class TNODES_ND_clip(bpy.types.Node):
    bl_idname = 'TNODES_ND_clip'
    bl_label = 'Clip'
    bl_icon = 'DRIVER_DISTANCE'
    bl_type = 'TNODES'
    bl_width_default = 200


    def init(self, context):
        self.inputs.new('TNODES_FloatSocket', 'Value')
        self.inputs.new('TNODES_FloatSocket', 'Minimum')
        self.inputs.new('TNODES_FloatSocket', 'Maximum')
        self.outputs.new('TNODES_BasicSocketNoUpdate', 'Value')

        self.inputs["Maximum"].default_value = 1

Custom Float socket

class TNODES_FloatSocket(bpy.types.NodeSocket):
    bl_idname = 'TNODES_FloatSocket'
    bl_label = "Custom Node Socket"

    def prop_update(self, context):
        if hasattr(context, 'node'):
            reset_connections(context.node)

    default_value: FloatProperty(
        description='Custom Height',
        min=0,
        default=0,
        precision=5,
        step=0.1,
        update=prop_update)

@JoshuaKnauber @lichtwerk I think Joshua figured it out, here is my script for the node, it uses custom float socket. I can't share the entire script here, but I can email it if you like. Node UI ``` class TNODES_ND_clip(bpy.types.Node): bl_idname = 'TNODES_ND_clip' bl_label = 'Clip' bl_icon = 'DRIVER_DISTANCE' bl_type = 'TNODES' bl_width_default = 200 def init(self, context): self.inputs.new('TNODES_FloatSocket', 'Value') self.inputs.new('TNODES_FloatSocket', 'Minimum') self.inputs.new('TNODES_FloatSocket', 'Maximum') self.outputs.new('TNODES_BasicSocketNoUpdate', 'Value') self.inputs["Maximum"].default_value = 1 ``` Custom Float socket ``` class TNODES_FloatSocket(bpy.types.NodeSocket): bl_idname = 'TNODES_FloatSocket' bl_label = "Custom Node Socket" def prop_update(self, context): if hasattr(context, 'node'): reset_connections(context.node) default_value: FloatProperty( description='Custom Height', min=0, default=0, precision=5, step=0.1, update=prop_update) ```

This issue was referenced by 61fe0d6264

This issue was referenced by 61fe0d626441fbe07020e1478fba95983e7c94e5

This issue was referenced by ab2a7aa0da

This issue was referenced by ab2a7aa0da81678b19e3362b93f89e8302da65d8
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Will close this as a duplicate of #93430 (Custom node sockets don't get relinked when dropping a node on an existing link)

Thanks for the report.

Will close this as a duplicate of #93430 (Custom node sockets don't get relinked when dropping a node on an existing link) Thanks for the report.
Member

Closed as duplicate of #93430

Closed as duplicate of #93430
Member

Changed status from 'Duplicate' to: 'Resolved'

Changed status from 'Duplicate' 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
5 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#93438
No description provided.