AOV output node has conflicting python parameter naming convention which makes them unselectable by name via python. #111450

Open
opened 2023-08-23 23:11:24 +02:00 by michael campbell · 2 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.99

Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-06-30 00:04, hash: e73a9a6a7d7b
Worked: unsure if ever worked

Short description of error
aov output node has an input parameter called 'name' this conflicts with the node.name used to change the name of the actual node.
image

This means that when you set the node name via python using:

new_node = bpy.data.node_groups['.my_Group'].nodes.new("ShaderNodeOutputAOV")
new_node.name = 'hello'

you can't then reference the node by name using:

n = bpy.data.node_groups['.my_group'].nodes['hello']

because it'll return error:

KeyError: 'bpy_prop_collection[key]: key "hello" not found'

Exact steps for others to reproduce the error

  1. open attached blend file
  2. go to the script workspace
  3. run the script

I believe the aov output node's 'name' input parameter should be:

bpy.data.node_groups['.my_group'].nodes['hello'].inputs['name']

rather than it being set by node.name.

Or alternatively, setting the node.name should set both the name input parameter and the node's name?

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.99 **Blender Version** Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-06-30 00:04, hash: `e73a9a6a7d7b` Worked: unsure if ever worked **Short description of error** aov output node has an input parameter called 'name' this conflicts with the node.name used to change the name of the actual node. ![image](/attachments/3dcbc4ff-32fc-4e01-9e35-891c91afa874) This means that when you set the node name via python using: ```py new_node = bpy.data.node_groups['.my_Group'].nodes.new("ShaderNodeOutputAOV") new_node.name = 'hello' ``` you can't then reference the node by name using: ```py n = bpy.data.node_groups['.my_group'].nodes['hello'] ``` because it'll return error: KeyError: 'bpy_prop_collection[key]: key "hello" not found' **Exact steps for others to reproduce the error** 1. open attached blend file 2. go to the script workspace 3. run the script I believe the aov output node's 'name' input parameter should be: ```py bpy.data.node_groups['.my_group'].nodes['hello'].inputs['name'] ``` rather than it being set by node.name. Or alternatively, setting the node.name should set both the name input parameter and the node's name?
michael campbell added the
Type
Report
Status
Needs Triage
Severity
Normal
labels 2023-08-23 23:11:24 +02:00
Member

Thanks for the report. I can confirm.

Thanks for the report. I can confirm.
Member

Reminds me of #104909

Reminds me of #104909
Bart van der Braak added
Type
Bug
and removed
Type
Report
labels 2024-08-14 13:09:36 +02: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
3 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#111450
No description provided.