import bpy class UAC_addon_prefs(bpy.types.AddonPreferences): ## can be just __name__ if prefs are in the __init__ mainfile # Else need the splitext '__name__ = addonname.subfile' (or use a static name) bl_idname = __name__.split('.')[0] # or with: os.path.splitext(__name__)[0] # some_bool_prop to display in the addon pref debug : bpy.props.BoolProperty( name='Debug', description="Enable Debug prints", default=False) tgt_bone : bpy.props.StringProperty( name="Constrained Pose bone name", default='world', description="name of the bone that suppose to hold the constraint") """ default_forward_axis : bpy.props.EnumProperty( name='Forward Axis', default='TRACK_NEGATIVE_Y', # Modifier default is FORWARD_X description='Axis that points forward along the path', items=( ('FORWARD_X', 'X', ''), ('FORWARD_Y', 'Y', ''), ('FORWARD_Z', 'Z', ''), ('TRACK_NEGATIVE_X', '-X', ''), ('TRACK_NEGATIVE_Y', '-Y', ''), ('TRACK_NEGATIVE_Z', '-Z', ''), ), ) """ def draw(self, context): layout = self.layout layout.use_property_split = True box = layout.box() box.label(text='Curve creation parameters:') box.prop(self, "tgt_bone") # box.prop(self, "default_forward_axis", text='Default Forward Axis') layout.prop(self, "debug") def register(): bpy.utils.register_class(UAC_addon_prefs) def unregister(): bpy.utils.unregister_class(UAC_addon_prefs)