Operating system: MacOS Catalina 10.15.7 (19H2)
Graphics card: Intel Iris Graphics 6100 1536 MB graphics
Broken: 2.91.0, b0f34eee30c4, master, 2020-10-21
Worked: not sure
Short description of error
The Blender manual describes that Blender can save custom properties to its data blocks (see link). However upon attempting to save a custom property to a ShaderNodeTree type, particularly to the C.scene.world.node_treee, it is clear that the custom property is not saved to the blend file. Other data blocks appear to work just fine.
Exact steps for others to reproduce the error
- Create a custom property on the C.scene.world.node_tree or on a material's node_tree;
import bpy from bpy.props import StringProperty bpy.types.ShaderNodeTree.uuid= StringProperty( name="Unique Id for hashing", default='') bpy.context.scene.world.node_tree.uuid = 'hamburgers with cheese'
- Save the blend file, close blender
- Open the file in blender and inspect the bpy.context.scene.world.node_tree to find the custom property and check its value.
- The custom property no longer exists. Its not listed in the data block's keys or items so that
bpy.context.scene.world.node_tree['uuid'] raises a key error
The same approach for saving custom properties to other data blocks, like materials or objects, works as expected.