diff --git a/client/ayon_core/host/dirmap.py b/client/ayon_core/host/dirmap.py index 2e24877d28..8766e7485d 100644 --- a/client/ayon_core/host/dirmap.py +++ b/client/ayon_core/host/dirmap.py @@ -15,7 +15,6 @@ from ayon_core.lib import Logger from ayon_core.addon import AddonsManager from ayon_core.settings import get_project_settings -from ayon_core.settings.lib import get_site_local_overrides @six.add_metaclass(ABCMeta) @@ -163,7 +162,7 @@ def _get_local_sync_dirmap(self): if ( sitesync_addon is None or not sitesync_addon.enabled - or project_name not in sitesync_addon.get_enabled_projects() + or not sitesync_addon.is_project_enabled(project_name, True) ): return mapping @@ -181,17 +180,14 @@ def _get_local_sync_dirmap(self): exclude_locals=False, cached=False) - # TODO implement - # Dirmap is dependent on 'get_site_local_overrides' which - # is not implemented in AYON. The mapping should be received - # from sitesync addon. - active_overrides = get_site_local_overrides( + # overrides for roots set in `Site Settings` + active_roots = sitesync_addon.get_site_root_overrides( project_name, active_site) - remote_overrides = get_site_local_overrides( + remote_roots = sitesync_addon.get_site_root_overrides( project_name, remote_site) - self.log.debug("local overrides {}".format(active_overrides)) - self.log.debug("remote overrides {}".format(remote_overrides)) + self.log.debug("active roots overrides {}".format(active_roots)) + self.log.debug("remote roots overrides {}".format(remote_roots)) current_platform = platform.system().lower() remote_provider = sitesync_addon.get_provider_for_site( @@ -201,9 +197,9 @@ def _get_local_sync_dirmap(self): # won't be root on cloud or sftp provider if remote_provider != "local_drive": remote_site = "studio" - for root_name, active_site_dir in active_overrides.items(): + for root_name, active_site_dir in active_roots.items(): remote_site_dir = ( - remote_overrides.get(root_name) + remote_roots.get(root_name) or sync_settings["sites"][remote_site]["root"][root_name] ) diff --git a/client/ayon_core/settings/lib.py b/client/ayon_core/settings/lib.py index 3929818d31..3126bafd57 100644 --- a/client/ayon_core/settings/lib.py +++ b/client/ayon_core/settings/lib.py @@ -123,22 +123,6 @@ def get_addon_versions(cls): return cache_item.get_value() -def get_site_local_overrides(project_name, site_name, local_settings=None): - """Site overrides from local settings for passet project and site name. - - Deprecated: - This function is not implemented for AYON and will be removed. - - Args: - project_name (str): For which project are overrides. - site_name (str): For which site are overrides needed. - local_settings (dict): Preloaded local settings. They are loaded - automatically if not passed. - """ - - return {} - - def get_ayon_settings(project_name=None): """AYON studio settings.