Page MenuHome

Preferences Modification Auto-Save Bug
Open, Needs Triage by DeveloperPublic


System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 418.81

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-11 13:50, hash: rB06312c6d2db8
Worked: (optional)

Short description of error
User preferences and add-on preferences are normally auto-saved when Blender exits, and it is triggered when the user modifies preferences data through the UI. But there appears to be a bug that prevents this from happening when the preference data is defined inside of a property group.

Exact steps for others to reproduce the error
Write a simple script that adds/draws two preference variables for an add-on: One directly inside of a class derived from bpy.types.AddonPreferences (root preference), and one inside of a class derived from bpy.types.PropertyGroup (group preference). Make sure to include the property group instance as a bpy.props.PointerProperty. During execution, if the user modifies the root preference through the UI, auto-save will be triggered correctly, and both values will be saved on exit. However, if the user modifies the group preference only, neither value will be saved on exit.

A similar issue occurs when preference values are programmatically altered (auto-save is not triggered), but I'm not sure if this is a bug, or lack of a feature.



Event Timeline

It is probably related to the problem described in T66303
Could you provide a blend file or script demonstrating the problem?

I'm very new to Python and Blender development, so I'm probably not the best person to throw one together. But it should be simple to do so for someone who knows what they're doing. It would be even easier to modify a copy of an existing add-on, which would only involve moving some preferences properties from the primary preferences structure to a child property group derived class. There may even already be some add-ons setup this way - I will try to find one. If needed, I can try to throw something together, or make a slight modification to one of the built-in add-ons.