When developing add-ons it is often necessary to give an ability to set a number of parameters that affect the whole add-on work to the user. For example, the user can specify a directory for saving/loading files, set some default variables or switch between add-on modes. Of course, the interface for setting such parameters can be placed in the add-on panel, but it is better to place it in a separate add-on preferences panel, which is located in the “Preferences” window under the add-on installation panel.
The main advantage of the add-on preferences is that they don’t reset when Blender restarts. The user does not need to configure the add-on preferences each time, it’s enough to set the necessary parameters once, personalizing the add-on for convenient work.
Let’s create an add-on and define a parameter, placing it in the add-on preferences panel.
In Blender 2.7 the current coordinate system could be changed through the
property. In Blender 2.8 coordinate system access moved to the scene collection of “TransformOrientatiosSlots” objects. To get or set the current coordinate system the “transform_orientation_slots” collection is used.