Fix AttributeError in node groups when custom socket has no 'draw' function #117061

Merged
Jacques Lucke merged 2 commits from povmaniac/blender:povmaniac into main 2024-01-16 15:41:13 +01:00
Contributor

This are a fix for the error "AttributeError: 'NodeTreeInterfaceSocket' object does not have 'draw' attribute" when the side panel in the Node Editor try to show the properties of a custom node groups created from external engines. This check is similar to the other one added on line 731 in the same space_node.py file

This are a fix for the error "AttributeError: 'NodeTreeInterfaceSocket' object does not have 'draw' attribute" when the side panel in the Node Editor try to show the properties of a custom node groups created from external engines. This check is similar to the other one added on line 731 in the same space_node.py file
Pedro A. added 2 commits 2024-01-12 13:06:00 +01:00
Iliya Katushenock added this to the Nodes & Physics project 2024-01-12 13:08:07 +01:00
Iliya Katushenock added the
Interest
Python API
label 2024-01-12 13:08:15 +01:00

Note the WIP prefix means you do not consider it ready to be reviewed and are still planning changes. If that's not the case, best to remove it.

Note the WIP prefix means you do not consider it ready to be reviewed and are still planning changes. If that's not the case, best to remove it.
Brecht Van Lommel requested review from Lukas Tönne 2024-01-12 15:05:44 +01:00
Brecht Van Lommel requested review from Jacques Lucke 2024-01-12 15:05:44 +01:00

I'm not sure if this is new, and if so what caused it. So just guessed some reviewers.

I'm not sure if this is new, and if so what caused it. So just guessed some reviewers.
Author
Contributor

I added the WIP prefix since I don't know if this is the best approach to fix, but I can remove it.

I added the WIP prefix since I don't know if this is the best approach to fix, but I can remove it.
Pedro A. changed title from WIP: fix error "AttributeError: 'NodeTreeInterfaceSocket' object does not have 'draw' attribute" to fix error "AttributeError: 'NodeTreeInterfaceSocket' object does not have 'draw' attribute" 2024-01-12 18:22:43 +01:00
Member

This seems fine to me. The draw function of socket types is optional. All internal socket types have this callback, which is why the error didn't come up earlier. It only happens for node groups with custom socket types that don't register this function. The same check is also done in the node properties sidebar panel:
3feeede7bb/scripts/startup/bl_ui/space_node.py (L732)

This seems fine to me. The `draw` function of socket types is optional. All internal socket types have this callback, which is why the error didn't come up earlier. It only happens for node groups with custom socket types that don't register this function. The same check is also done in the node properties sidebar panel: https://projects.blender.org/blender/blender/src/commit/3feeede7bb1edb5edd1e71773a6346c1d3d52668/scripts/startup/bl_ui/space_node.py#L732
Lukas Tönne changed title from fix error "AttributeError: 'NodeTreeInterfaceSocket' object does not have 'draw' attribute" to Fix AttributeError in node groups when custom socket has no 'draw' function 2024-01-15 12:33:59 +01:00
Lukas Tönne approved these changes 2024-01-15 12:34:13 +01:00
Jacques Lucke approved these changes 2024-01-16 15:39:30 +01:00
Jacques Lucke merged commit 6d63da40ee into main 2024-01-16 15:41:13 +01:00
Pedro A. deleted branch povmaniac 2024-01-16 16:50:18 +01:00
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 Assignees
4 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#117061
No description provided.