bpy.data.node_groups is not accessible via the Python console #68053

Closed
opened 2019-08-01 10:58:35 +02:00 by Jesse Kaukonen · 8 comments
Member

System Information
Operating system: Debian 10
Graphics card: Intel HD 4000

Blender Version
Broken: v 2.81 Alpha, Date 2019-07-30 20:50, Hash: 5359b7a03307 (latest daily linux 64-bit)

The following expression in the python console produces a key not found error:

bpy.data.node_groups["Shader NodeTree"]

In the scripting workspace, the executed python expressions window displays the same map access working if you go in the shader editor and perform some sort of action that operates on the node_groups map, such as changing the default shader specular value. The case sensitivity does not seem to matter - sometimes the printout window shows the string as "Shader Nodetree", sometimes as "Shader NodeTree".

Exact steps for others to reproduce the error

  • Start default 2.81 scene
  • Go to scripting workspace
  • Type bpy.data.node_groups["Shader NodeTree"] in the console
  • Using the mouse, go in the Shader editor and perform some action on the default Principled BSDF shader and observe the map being accessed in the Python expression printout window using the identical string

blender_281_pythonscripting0001.png

**System Information** Operating system: Debian 10 Graphics card: Intel HD 4000 **Blender Version** Broken: v 2.81 Alpha, Date 2019-07-30 20:50, Hash: 5359b7a03307 (latest daily linux 64-bit) The following expression in the python console produces a key not found error: ``` bpy.data.node_groups["Shader NodeTree"] ``` In the scripting workspace, the executed python expressions window displays the same map access working if you go in the shader editor and perform some sort of action that operates on the `node_groups` map, such as changing the default shader specular value. The case sensitivity does not seem to matter - sometimes the printout window shows the string as "Shader Nodetree", sometimes as "Shader NodeTree". **Exact steps for others to reproduce the error** * Start default 2.81 scene * Go to scripting workspace * Type `bpy.data.node_groups["Shader NodeTree"]` in the console * Using the mouse, go in the Shader editor and perform some action on the default Principled BSDF shader and observe the map being accessed in the Python expression printout window using the identical string ![blender_281_pythonscripting0001.png](https://archive.blender.org/developer/F7641254/blender_281_pythonscripting0001.png)
Author
Member

Added subscriber: @gekko

Added subscriber: @gekko
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Confirmed, checking...

Confirmed, checking...
Philipp Oeser self-assigned this 2019-08-01 11:34:43 +02:00
Member

Will put on my desk for investigation

Will put on my desk for investigation

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

That is not technically a bug, although it is confusing (and a pain to handle in C code as well), 'root' node trees are not regular data-blocks, and are not available from bpy.data. They are closer to some private data of their owner (material, light, scene data-blocks), and should only be accessed through them. Thanks for the report anyway.

That is not technically a bug, although it is confusing (and a pain to handle in C code as well), 'root' node trees *are not* regular data-blocks, and are not available from `bpy.data`. They are closer to some private data of their owner (material, light, scene data-blocks), and should only be accessed through them. Thanks for the report anyway.
Member

@mont29: should we tweak the data-path-reporting to their respective owner then? (or is this this even imposiible? -- havent checked code yet...)
(inclined to repoen as TODO with low prio for my desk -- this has been bugging me as well, just feels like a bug -- same goes for #68054...)

@mont29: should we tweak the data-path-reporting to their respective owner then? (or is this this even imposiible? -- havent checked code yet...) (inclined to repoen as TODO with low prio for my desk -- this has been bugging me as well, just feels like a bug -- same goes for #68054...)
Sign in to join this conversation.
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-addons#68053
No description provided.