-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
preferences.py
67 lines (57 loc) · 1.9 KB
/
preferences.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import bpy
from . import addon_updater_ops
@addon_updater_ops.make_annotations
class SAT_preferences(bpy.types.AddonPreferences):
"""Valve Armature Toolkit updater preferences"""
bl_idname = __package__
# Updater preferences
auto_check_update: bpy.props.BoolProperty(
name="Auto-check for Update",
description="If enabled, auto-check for updates using an interval",
default=True,
)
updater_intrval_months: bpy.props.IntProperty(
name="Months",
description="Number of months between checking for updates",
default=0,
min=0,
)
updater_intrval_days: bpy.props.IntProperty(
name="Days",
description="Number of days between checking for updates",
default=2,
min=0,
max=31,
)
updater_intrval_hours: bpy.props.IntProperty(
name="Hours",
description="Number of hours between checking for updates",
default=0,
min=0,
max=23,
)
updater_intrval_minutes: bpy.props.IntProperty(
name="Minutes",
description="Number of minutes between checking for updates",
default=0,
min=0,
max=59,
)
# Addon preferences
enable_rigify_retarget: bpy.props.BoolProperty(
name="Enable Rigify Retarget (Buggy)",
description="Disabled by default as it's quite buggy in later versions of Blender",
default=False,
)
show_info: bpy.props.BoolProperty(
name="Show operator information",
description="If to show description of what each operator is made for",
default=True,
)
def draw(self, context):
layout = self.layout
settings = addon_updater_ops.get_user_preferences(context)
layout.prop(settings, "enable_rigify_retarget")
layout.prop(settings, "show_info")
# Addon panel
addon_updater_ops.update_settings_ui(self, context)