import bpy from bpy.types import AddonPreferences from bpy.props import BoolProperty from .. import __package__ as base_package class SWPreferences(AddonPreferences): bl_idname = base_package use_global: BoolProperty(name="Use default workspaces", description="Switch the workspace topbar between Scene Workspaces and the default one", default=False) show_switch: BoolProperty(name="Show Switch", description="Show/Hide the switch button next to the workspaces topbar. Useful for quickly lookup the original workspaces topbar", default=True) active_spacing: BoolProperty(name="Active workspace spacing", description="Add space around the active workspace", default=True) quick_unlink: BoolProperty(name="Show Quick Unlink", description="Show/Hide the unlink button at left of the active workspace", default=True) def draw(self, context): layout = self.layout layout.prop(self, "use_global") layout.prop(self, "show_switch") box = layout.box() box.label("UI Options") box.prop(self, "quick_unlink") box.prop(self, "active_spacing")