When I assign a new bpy.props
Property to the Scene, like this: bpy.types.Scene.my_prop = bpy.props.IntProperty()
- I can then set unique my_prop
value for each Scene in the Blender project. The same is with the Object, Material, etc. But I would like to have some PropertyGroup
attached to the current project, which settings would be unique for each project, but remain the same for all the scenes, objects and other data blocks in it. I could not find anything like bpy.types.Project
. There is bpy.types.BlendData
, but when I assign any bpy.props
to it as an argument, it appears in bpy.context.blend_data
as a function, not as a registered property. Also this attribute can not be changed or deleted once it was set. I understand that what I want is probably not the way it meant to work and that once the Property is registered it is meant to stay available regardless closing and opening the projects, until it is unregistered. I just want to clarify if there is no straight forward way to assign the Property to the Project itself. Is it so or am I missing something?
UPD. The only way I see for now is to assign PropertyGroup as an attribute of the bpy.types.Scene
and to write an operator which would copy the values from the PropertyGroup of the context scene to all the other scenes every time the property is changed. But in this way it may be pretty tricky to write update functions for the properties.