mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
AY-1232 - used addon's get_site_root_overrides
Addon's get_site_root_overrides should return overridden root values for any site which is overridden by Site Settings. 'studio' site is currently overridden by `Roots` tab and comes from project settings directly.
This commit is contained in:
parent
1ef840f0cb
commit
d4e90a4eb2
1 changed files with 7 additions and 11 deletions
|
|
@ -15,7 +15,6 @@ import six
|
|||
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)
|
||||
|
|
@ -181,17 +180,14 @@ class HostDirmap(object):
|
|||
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 @@ class HostDirmap(object):
|
|||
# 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]
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue