1
$\begingroup$

In my add-on, I would like to add a property that is not scene-specific but unique for the entire project file so I can call it from any scene and always get the same value.

In case you need to know, in my situation it would be a PointerProperty that points to a list of properties of different types.

I know how to add a Scene-specific property by adding a line like this in the register function:

bpy.types.Scene.my_prop = PointerProperty(type=my_list_of_properties)

But what about a Project File property? Is that even a thing?

$\endgroup$
10
  • $\begingroup$ You can eg. use addon preferences or the window manager. $\endgroup$
    – brockmann
    Commented Jun 15, 2020 at 22:42
  • $\begingroup$ Thank you. Sorry I missed that other question. $\endgroup$ Commented Jun 15, 2020 at 22:49
  • $\begingroup$ Glad I could help @ChameleonScales $\endgroup$
    – brockmann
    Commented Jun 15, 2020 at 22:50
  • $\begingroup$ I'm not clear on the first given tip. The users over there haven't been active recently so I'm unsure I'll get a response from them but I commented there anyway. $\endgroup$ Commented Jun 16, 2020 at 19:16
  • $\begingroup$ What exactly is not clear? Suggest to use bpy.types.WindowManager, also done that way in rigify. $\endgroup$
    – brockmann
    Commented Jun 16, 2020 at 19:28

0

Browse other questions tagged .