Blender SVN: New Features #273
@ -26,6 +26,12 @@ class SVN_addon_preferences(AddonPreferences):
|
||||
default=False
|
||||
)
|
||||
|
||||
do_auto_updates: BoolProperty(
|
||||
name="Auto-Update",
|
||||
description="Automatically download updates as they appear on the remote",
|
||||
default=False
|
||||
)
|
||||
|
||||
repositories: CollectionProperty(type=SVN_repository)
|
||||
|
||||
def init_repo_list(self):
|
||||
@ -110,6 +116,9 @@ class SVN_addon_preferences(AddonPreferences):
|
||||
def is_busy(self):
|
||||
return Processes.is_running('Commit', 'Update')
|
||||
|
||||
|
||||
### Keeping a backup of repository data in blender_svn.txt. ###
|
||||
### This is important so it doesn't get lost on add=on disable. ###
|
||||
loading: BoolProperty(
|
||||
name="Loading",
|
||||
description="Disable the credential update callbacks while loading repo data to avoid infinite loops",
|
||||
|
@ -165,6 +165,9 @@ class BGP_SVN_Status(BackgroundProcess):
|
||||
update_file_list_svn_list(context, self.list_command_output)
|
||||
repo.refresh_ui_lists(context)
|
||||
self.timestamp_last_update = time.time()
|
||||
if prefs.do_auto_updates:
|
||||
if any([f.repos_status != 'normal' for f in repo.external_files]):
|
||||
print("Automatic updates would start now.")
|
||||
|
||||
def get_ui_message(self, context):
|
||||
time_since_last_update = time.time() - self.timestamp_last_update
|
||||
|
@ -223,7 +223,9 @@ def draw_file_list(context, layout):
|
||||
|
||||
col.separator()
|
||||
col.operator("svn.commit", icon='EXPORT', text="")
|
||||
col.operator("svn.update_all", icon='IMPORT', text="").revision = 0
|
||||
col.prop(prefs, 'do_auto_updates', icon='TEMP', text="")
|
||||
if not prefs.do_auto_updates:
|
||||
col.operator("svn.update_all", icon='IMPORT', text="").revision = 0
|
||||
|
||||
col.separator()
|
||||
col.operator("svn.cleanup", icon='BRUSH_DATA', text="")
|
||||
|
Loading…
Reference in New Issue
Block a user