Page MenuHome

Custom Properties for ShaderNodeTree do not save in blend files
Closed, ResolvedPublicBUG


System Information

Operating system: MacOS Catalina 10.15.7 (19H2)
Graphics card: Intel Iris Graphics 6100 1536 MB graphics

Blender Version
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, 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

  1. Create a custom property on the 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='') = 'hamburgers with cheese'
  1. Save the blend file, close blender
  2. Open the file in blender and inspect the to find the custom property and check its value.
  3. The custom property no longer exists. Its not listed in the data block's keys or items so that['uuid'] raises a key error

The same approach for saving custom properties to other data blocks, like materials or objects, works as expected.

Event Timeline

I retract my previous comment, you're following the approach outlined here.

Robert Guetzkow (rjg) changed the task status from Needs Triage to Confirmed.Nov 4 2020, 11:19 AM

Since ShaderNodeTree is a subclass of ID, this is supposed to work.

Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".Nov 4 2020, 11:25 AM

Same issue with master collections of scenes actually.

@Bastien Montagne (mont29) @Robert Guetzkow (rjg) @Philipp Oeser (lichtwerk) Thanks guys :) Really appreciate you guys looking into this. Willing to test this as soon as its in a daily build if that will help.

Weird, just checked this issue and can see its closed, but didn't get an update via e-mail, is that expected? I got the initial one about the issue being created!

I got the mail... Yours might have ended up in spams? Got closed by the fixing commit.

I got the mail... Yours might have ended up in spams? Got closed by the fixing commit.

Yeah maybe :) not sure, I had a look in there, nothing. never mind though, glad it got closed :)