No socket description will be shown in the "VIEW_3D" "UI" Panel #113517

Closed
opened 2023-10-10 20:45:57 +02:00 by Andrea Donati · 9 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 528.49

Blender Version
Broken: version: 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-10-04 23:50, hash: 2f71d9f80795
Worked: (newest version of Blender that worked as expected)

Short description of error
No description when touching the property with the mouse in a "VIEW_3D" "UI" Panel

Exact steps for others to reproduce the error

import bpy

from bpy.types import Panel

class MYADDON_PT_MyPanel(Panel):

    bl_label = "My Panel"
    bl_idname = "MYADDON_PT_MyPanel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "My Addon"

    def draw(self, context):
        
        ob = context.object
        if not ob:
            return
        mat = ob.active_material
        if not mat:
            return
        
        if not mat.use_nodes:
            return
        
        node_tree = mat.node_tree
        
        nodes = node_tree.nodes

        my_node = nodes.get("My Node")
        if not my_node:
            return


        layout = self.layout
        for n_input in my_node.inputs:
            layout.prop(n_input, 'default_value', text=n_input.name)
            
            
def register():
    bpy.utils.register_class(MYADDON_PT_MyPanel)
    
def unregister():
    bpy.utils.unregister_class(MYADDON_PT_MyPanel)
    

if __name__ == "__main__":
    register()
    
            


**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 528.49 **Blender Version** Broken: version: 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-10-04 23:50, hash: `2f71d9f80795` Worked: (newest version of Blender that worked as expected) **Short description of error** No description when touching the property with the mouse in a "VIEW_3D" "UI" Panel **Exact steps for others to reproduce the error** ```Py import bpy from bpy.types import Panel class MYADDON_PT_MyPanel(Panel): bl_label = "My Panel" bl_idname = "MYADDON_PT_MyPanel" bl_space_type = 'VIEW_3D' bl_region_type = 'UI' bl_category = "My Addon" def draw(self, context): ob = context.object if not ob: return mat = ob.active_material if not mat: return if not mat.use_nodes: return node_tree = mat.node_tree nodes = node_tree.nodes my_node = nodes.get("My Node") if not my_node: return layout = self.layout for n_input in my_node.inputs: layout.prop(n_input, 'default_value', text=n_input.name) def register(): bpy.utils.register_class(MYADDON_PT_MyPanel) def unregister(): bpy.utils.unregister_class(MYADDON_PT_MyPanel) if __name__ == "__main__": register() ```
Andrea Donati added the
Type
Report
Status
Needs Triage
Severity
Normal
labels 2023-10-10 20:45:57 +02:00
Iliya Katushenock added the
Interest
Nodes & Physics
Interest
User Interface
labels 2023-10-10 20:47:12 +02:00

Is the provided script all I need to reproduce the issue? I get

Traceback (most recent call last):
  File "/home/me/Desktop/bugs/113517.blend/Text", line 22, in draw
AttributeError: 'ShaderNodeTree' object has no attribute 'use_nodes'
Is the provided script all I need to reproduce the issue? I get ``` Traceback (most recent call last): File "/home/me/Desktop/bugs/113517.blend/Text", line 22, in draw AttributeError: 'ShaderNodeTree' object has no attribute 'use_nodes' ```
Richard Antalik added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-10-10 23:38:49 +02:00
Author

Lo script fornito è tutto ciò di cui ho bisogno per riprodurre il problema? Ottengo ``` Traceback (most latest call last): File "/home/me/Desktop/bugs/113517.blend/Text", riga 22, in draw AttributeError: L'oggetto 'ShaderNodeTree' non ha attributo 'use_nodes' `` `

Yes You are right, Apologies for the script, I provided a more complete version. Make sure to rename the node to "My Node" and that the node is of type Group and that a description is inserted in the group socket (Now items_tree).

> Lo script fornito è tutto ciò di cui ho bisogno per riprodurre il problema? Ottengo ``` Traceback (most latest call last): File "/home/me/Desktop/bugs/113517.blend/Text", riga 22, in draw AttributeError: L'oggetto 'ShaderNodeTree' non ha attributo 'use_nodes' `` ` Yes You are right, Apologies for the script, I provided a more complete version. Make sure to rename the node to "My Node" and that the node is of type Group and that a description is inserted in the group socket (Now items_tree).

I can't reproduce here - it shows the description to me. Or is the issue something else?

I can't reproduce here - it shows the description to me. Or is the issue something else?
Author

No Description here, I just get "Input value used for unconnected socket"

I tried both on Group nodes and on Blender nodes where the description is present.

I tried both on Group nodes and on Blender nodes where the description is present.

To be safe I also downloaded and tried Today's Build.

Unless there is something to set in the preferences, or in the code, I can't show the description in the panel like you did.

Something doesn't seem to be going as it should

No Description here, I just get "Input value used for unconnected socket" I tried both on Group nodes and on Blender nodes where the description is present. I tried both on Group nodes and on Blender nodes where the description is present. To be safe I also downloaded and tried Today's Build. Unless there is something to set in the preferences, or in the code, I can't show the description in the panel like you did. Something doesn't seem to be going as it should

Ah sorry, I saw the words, but did not read them. "Input value used for unconnected socket" is what I see as well. But this is what you get even if you hover over node group. You can add description to the property, but I think this is drawn as label then, because it does not show it in Group tab in side panel still. It could be hardcoded behavior in C++, but I would assume it would be possible to implement. You would still have to either set description for the property or you would have to fetch it from connected node.
But this isn't really a bug, so will close this report.

Ah sorry, I saw the words, but did not read them. "Input value used for unconnected socket" is what I see as well. But this is what you get even if you hover over node group. You can add description to the property, but I think this is drawn as label then, because it does not show it in Group tab in side panel still. It could be hardcoded behavior in C++, but I would assume it would be possible to implement. You would still have to either set description for the property or you would have to fetch it from connected node. But this isn't really a bug, so will close this report.
Blender Bot added
Status
Archived
and removed
Status
Needs Information from User
labels 2023-10-11 22:37:58 +02:00
Author

Maybe I didn't explain myself well 😅

The property I'm talking about is that of the socket node_tree.items_tree['my_item'].description, this is shown on the node but not in the interface I gave the example with python.

I'll give an example:

image

Maybe I didn't explain myself well 😅 The property I'm talking about is that of the socket `node_tree.items_tree['my_item'].description`, this is shown on the node but not in the interface I gave the example with python. I'll give an example: ![image](/attachments/3dafee85-8bf4-4340-8468-435798e783a2)
156 KiB

Will check how this is exactly drawn. As I said, it will be probably hardcoded

Will check how this is exactly drawn. As I said, it will be probably hardcoded
Blender Bot added
Status
Needs Triage
and removed
Status
Archived
labels 2023-10-12 01:00:51 +02:00
Member

Will confirm for now

Will confirm for now
Philipp Oeser added
Status
Confirmed
Module
Nodes & Physics
and removed
Status
Needs Triage
labels 2023-10-23 14:54:45 +02:00
Member

This is just how the node system's RNA works currently. The property isn't special for every socket in every node, it's just the NodeSocketColor default_value property. The technical changes necessary to make this work differently aren't clear, and it's not a priority currently, so I'll close this report.

This is just how the node system's RNA works currently. The property isn't special for every socket in every node, it's just the `NodeSocketColor` `default_value` property. The technical changes necessary to make this work differently aren't clear, and it's not a priority currently, so I'll close this report.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-02-01 19:14:27 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
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#113517
No description provided.