Saving WindowManager Properties

Hi Blender Artists,

According to @CoDEmanX, I had to place my properties in bpy.types.WindowManager to have crossed scene properties.

However, it seems it’s not stored in the blend file.

Should I move this somewhere else, or there is a special option/trick to save the WindowManager properties?

Thanks.

WindowManager is not a place to store properties you want saved. Conversely, WindowManager is for properties you DONT want saved.

Think: session state.

Thanks @dustractor for the input. But that’s bring me back to my original problem. How can I save global properties in my blendfile?

WindowManager properties aren’t serialized, but the WindowManager is the only type with a single instance - thus it can be temporarily used like a global. There is no type which can be used like a singleton, but you can use ID properties to save properties on certain ID type instances (e.g. bpy.context.scene[“prop”] = 123).