kopia lustrzana https://github.com/vilemduha/blendercam
autoupdate disable option
rodzic
5d12e32a9b
commit
baa29586d7
|
@ -137,9 +137,9 @@ class CamAddonPreferences(AddonPreferences):
|
|||
("https://api.github.com/repos/pppalain/blendercam/releases", "Unstable", "Unstable releases (github.com/pppalain/blendercam)"),
|
||||
("https://github.com/pppalain/blendercam/archive/refs/heads/master.zip", "Daily", "Direct from git repository (github.com/pppalain/blendercam)"),
|
||||
("<CUSTOM_DOWNLOAD_SOURCE>","Source","Where the release was downloaded from"),
|
||||
("","None","Don't do auto update"),
|
||||
("None","None","Don't do auto update"),
|
||||
],
|
||||
default="",
|
||||
default="None",
|
||||
)
|
||||
|
||||
last_update_check: IntProperty(
|
||||
|
@ -1195,7 +1195,7 @@ def check_operations_on_load(context):
|
|||
# load last used machine preset
|
||||
bpy.ops.script.execute_preset(filepath=machine_preset,menu_idname="CAM_MACHINE_MT_presets")
|
||||
_IS_LOADING_DEFAULTS=False
|
||||
# check for updated plugin
|
||||
# check for updated version of the plugin
|
||||
bpy.ops.render.cam_check_updates()
|
||||
|
||||
|
||||
|
|
|
@ -18,10 +18,14 @@ class UpdateChecker(bpy.types.Operator):
|
|||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
def execute(self, context):
|
||||
print("update check")
|
||||
last_update_check = bpy.context.preferences.addons['cam'].preferences.last_update_check
|
||||
today=date.today().toordinal()
|
||||
update_source = bpy.context.preferences.addons['cam'].preferences.update_source
|
||||
|
||||
if last_update_check!=today or True: # TODO: remove after testing
|
||||
update_source = bpy.context.preferences.addons['cam'].preferences.update_source
|
||||
if update_source=="None":
|
||||
return {'FINISHED'}
|
||||
# get list of releases from github release
|
||||
if update_source.endswith("/releases"):
|
||||
with urlopen(update_source) as response:
|
||||
|
|
Ładowanie…
Reference in New Issue