Skip to content

Commit

Permalink
feat: add the option to disable automatic update checks in preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-hm committed May 21, 2022
1 parent ffc655a commit fbcb91d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ class NDPreferences(AddonPreferences):
default=False,
)

enable_update_check: BoolProperty(
name="Enable Update Check",
default=True,
)

overlay_pin_x: IntProperty(
name="Overlay Pin X Coordinate",
default=0,
Expand Down Expand Up @@ -255,6 +260,7 @@ def draw_general(self, box):
general_boxed_prefs = [
["The default angle to use for smoothing operations (eg. auto-smooth)", "default_smoothing_angle", True],
["Set a path for a custom screw heads .blend file", "custom_screw_heads_path", False],
["Automatically check if addon is up to date when Blender starts", "enable_update_check", False],
["Enable deprecated features for short term backwards compatibility", "enable_deprecated_features", False]]

for label, prop, expanded in general_boxed_prefs:
Expand Down Expand Up @@ -328,7 +334,10 @@ def register():

bpy.utils.register_class(NDPreferences)

lib.preferences.get_preferences().update_available = lib.updates.update_available(bl_info['version'])
if lib.preferences.get_preferences().enable_update_check:
lib.preferences.get_preferences().update_available = lib.updates.update_available(bl_info['version'])
else:
lib.preferences.get_preferences().update_available = False

print("""
███╗ ██╗██████╗
Expand Down

0 comments on commit fbcb91d

Please sign in to comment.