I just found out that it's possible to attach variables to scene objects without using Blender property types. For example..
bpy.data.scenes[0]["MyData"] = MyData
This data is also saved and loaded with the *.blend file just as with property types.
Is this safe to use? Is it restricted in any way? Can I attach anything, or just certain types? I tested it with a list of int
, and it worked, but I had to convert the loaded value back into a list after loading, with to_list()
.
I'm curious as to why I've rarely seen anyone doing this. Especially since it seems to be the only way to attach basic list types to scene objects (without defining the basic type inside of a property group, and defining that inside of a property collection).
One thing I can probably guess is that these would not support undo/redo functionality.
Appreciate any info on this