Node info python path always uses bpy.data.node_groups collection #35720

Closed
opened 10 years ago by givingsights · 12 comments

%%%--- Operating System, Graphics card ---

Testet on Win7 64bit

- Blender version with error, and version that worked ---

All recent builds produce that error

- Short description of error ---

Error massage in console: (See attachement)

Traceback (most recent call last):

File "<blender_console>", line 1, in <module>

KeyError: 'bpy_prop_collection[key]: key "Compositing Nodetree" not found'

- Steps for others to reproduce the error (preferably based on attached .blend file) ---

Change any node value of any node (of any nodetree).
Copy the last line from the command history into the console
Run the line. Now the error happens.

%%%

%%%--- Operating System, Graphics card --- Testet on Win7 64bit - Blender version with error, and version that worked --- All recent builds produce that error - Short description of error --- Error massage in console: (See attachement) Traceback (most recent call last): ``` File "<blender_console>", line 1, in <module> ``` KeyError: 'bpy_prop_collection[key]: key "Compositing Nodetree" not found' - Steps for others to reproduce the error (preferably based on attached .blend file) --- Change any node value of any node (of any nodetree). Copy the last line from the command history into the console Run the line. Now the error happens. %%%
Poster

Changed status to: 'Open'

Changed status to: 'Open'
Collaborator

#48628 was marked as duplicate of this issue

#48628 was marked as duplicate of this issue
Collaborator

blender/blender#37733 was marked as duplicate of this issue

blender/blender#37733 was marked as duplicate of this issue
Collaborator

%%%Looks like you are referring to the standard compositing node tree? This tree is not in bpy.data.node_groups, but is stored locally in Scene, i.e. you need to access it as

bpy.data.scenes["Scene"].node_tree.nodes["Value"].outputs- [x].default_value = 0.5

Only actual node groups are currently stored in bpy.data.node_groups. This is a legacy "feature" which is frequently causing trouble, but is not likely to be replaced any time soon. Using scene.node_tree works fine however for any scripting purpose. Closing this report.%%%

%%%Looks like you are referring to the standard compositing node tree? This tree is not in bpy.data.node_groups, but is stored locally in Scene, i.e. you need to access it as bpy.data.scenes["Scene"].node_tree.nodes["Value"].outputs- [x].default_value = 0.5 Only actual node groups are currently stored in bpy.data.node_groups. This is a legacy "feature" which is frequently causing trouble, but is not likely to be replaced any time soon. Using scene.node_tree works fine however for any scripting purpose. Closing this report.%%%
Collaborator

%%%Ah, after IRC discussion turns out the actual problem here is the data path generation in the info space, this produces bpy.data.node_groups for all node trees, even the integrated compo trees. Will look into that.%%%

%%%Ah, after IRC discussion turns out the actual problem here is the data path generation in the info space, this produces bpy.data.node_groups for all node trees, even the integrated compo trees. Will look into that.%%%
Collaborator

%%%Unfortunately this is not nicely solvable. The RNA function responsible for constructing the ID path assumes a consistent behavior of ID data blocks, which material/scene/texture node trees break. In order to handle this we would have to pass a lot of extra arguments to RNA functions which would be very messy. Since it's not actually a critical bug (only used for report strings) i would rather accept it for now and keep as a ToDo. Eventually i'd like to get rid of nested ID data blocks, then this issue would disappear as well.%%%

%%%Unfortunately this is not nicely solvable. The RNA function responsible for constructing the ID path assumes a consistent behavior of ID data blocks, which material/scene/texture node trees break. In order to handle this we would have to pass a lot of extra arguments to RNA functions which would be very messy. Since it's not actually a critical bug (only used for report strings) i would rather accept it for now and keep as a ToDo. Eventually i'd like to get rid of nested ID data blocks, then this issue would disappear as well.%%%
Collaborator

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
LukasTonne closed this issue 10 years ago
LukasTonne changed title from Changing Node Values not working to Node info python path always uses bpy.data.node_groups collection 9 years ago
Collaborator

Added subscriber: @artfunkel

Added subscriber: @artfunkel
Collaborator

◀ Merged tasks: blender/blender#37733.

◀ Merged tasks: blender/blender#37733.
Collaborator

Added subscriber: @IsaacWeaver

Added subscriber: @IsaacWeaver
p2or commented 6 years ago

Added subscriber: @p2or

Added subscriber: @p2or

Added subscriber: @Peter-Jackson

Added subscriber: @Peter-Jackson
Sign in to join this conversation.
No Label
good first issue
legacy module/Animation & Rigging
legacy module/Core
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/User Interface
legacy module/VFX & Video
legacy project/2.81
legacy project/2.82
legacy project/2.83
legacy project/2.90
legacy project/2.92
legacy project/2.93
legacy project/3.0
legacy project/3.1
legacy project/3.2
legacy project/3.4
legacy project/Add-ons (BF-Blender)
legacy project/Add-ons (Community)
legacy project/Alembic
legacy project/Animation & Rigging
legacy project/Asset Browser
legacy project/Automated Testing
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Blender Cloud
legacy project/Code Quest
legacy project/Collada
legacy project/Compositing
legacy project/Core
legacy project/Cycles
legacy project/Datablocks and Libraries
legacy project/Dependency Graph
legacy project/Documentation
legacy project/EEVEE & Viewport
legacy project/Freestyle
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Physics
legacy project/Game Python
legacy project/Game UI
legacy project/Geometry Nodes
legacy project/Good First Issue
legacy project/Grease Pencil
legacy project/Images & Movies
legacy project/Import/Export
legacy project/Infrastructure: Blender Buildbot
legacy project/Infrastructure: Blender Web Assets
legacy project/Infrastructure: Websites
legacy project/Modeling
legacy project/Modifiers
legacy project/Motion Tracking
legacy project/Nodes
legacy project/Nodes & Physics
legacy project/OpenGL Error
legacy project/Overrides
legacy project/Papercut
legacy project/Physics
legacy project/Pillar
legacy project/Pipeline, Assets & I/O
legacy project/Platform: Linux
legacy project/Platform: macOS
legacy project/Platforms, Builds, Tests & Devices
legacy project/Platform: Windows
legacy project/Python API
legacy project/Render & Cycles
legacy project/Render Pipeline
legacy project/Sculpt, Paint & Texture
legacy project/Straightforward Issue
legacy project/Text Editor
legacy project/Tracker Curfew
legacy project/Translations
legacy project/USD
legacy project/User Interface
legacy project/UV Editing
legacy project/VFX & Video
legacy project/Video Sequencer
legacy project/Virtual Reality
papercut
Priority › High
Priority › Low
Priority › Normal
Priority › Unbreak Now!
Status › Archived
Status › Confirmed
Status › Duplicate
Status › Needs Information from Developers
Status › Needs Information from User
Status › Needs Triage
Status › Resolved
straightforward issue
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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#35720
Loading…
There is no content yet.