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

Closed
opened 2013-06-12 18:03:12 +02:00 by Michael Schiemer · 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. %%%

Changed status to: 'Open'

Changed status to: 'Open'

#48628 was marked as duplicate of this issue

#48628 was marked as duplicate of this issue

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

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

%%%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.%%%
Member

%%%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.%%%
Member

%%%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.%%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Lukas Tönne changed title from Changing Node Values not working to Node info python path always uses bpy.data.node_groups collection 2013-12-08 12:59:51 +01:00
Member

Added subscriber: @artfunkel

Added subscriber: @artfunkel
Member

◀ Merged tasks: blender/blender#37733.

◀ Merged tasks: blender/blender#37733.
Member

Added subscriber: @IsaacWeaver

Added subscriber: @IsaacWeaver

Added subscriber: @p2or

Added subscriber: @p2or

Added subscriber: @Peter-Jackson

Added subscriber: @Peter-Jackson
Sign in to join this conversation.
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-addons#35720
No description provided.