mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
renamed 'FUSION_HOST_DIR' to 'FUSION_ADDON_ROOT'
This commit is contained in:
parent
8f20f3ce08
commit
2253e65f7d
7 changed files with 15 additions and 16 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from .addon import (
|
||||
get_fusion_version,
|
||||
FusionAddon,
|
||||
FUSION_HOST_DIR,
|
||||
FUSION_ADDON_ROOT,
|
||||
FUSION_VERSIONS_DICT,
|
||||
)
|
||||
|
||||
|
|
@ -9,6 +9,6 @@ from .addon import (
|
|||
__all__ = (
|
||||
"get_fusion_version",
|
||||
"FusionAddon",
|
||||
"FUSION_HOST_DIR",
|
||||
"FUSION_ADDON_ROOT",
|
||||
"FUSION_VERSIONS_DICT",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import re
|
|||
from ayon_core.addon import AYONAddon, IHostAddon
|
||||
from ayon_core.lib import Logger
|
||||
|
||||
FUSION_HOST_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
FUSION_ADDON_ROOT = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
# FUSION_VERSIONS_DICT is used by the pre-launch hooks
|
||||
# The keys correspond to all currently supported Fusion versions
|
||||
|
|
@ -55,7 +55,7 @@ class FusionAddon(AYONAddon, IHostAddon):
|
|||
def get_launch_hook_paths(self, app):
|
||||
if app.host_name != self.host_name:
|
||||
return []
|
||||
return [os.path.join(FUSION_HOST_DIR, "hooks")]
|
||||
return [os.path.join(FUSION_ADDON_ROOT, "hooks")]
|
||||
|
||||
def add_implementation_envs(self, env, app):
|
||||
# Set default values if are not already set via settings
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ from ayon_core.pipeline import (
|
|||
from ayon_core.pipeline.load import any_outdated_containers
|
||||
from ayon_core.host import HostBase, IWorkfileHost, ILoadHost, IPublishHost
|
||||
from ayon_core.tools.utils import host_tools
|
||||
from ayon_fusion import FUSION_HOST_DIR
|
||||
from ayon_fusion import FUSION_ADDON_ROOT
|
||||
|
||||
|
||||
from .lib import (
|
||||
|
|
@ -35,7 +35,7 @@ from .lib import (
|
|||
|
||||
log = Logger.get_logger(__name__)
|
||||
|
||||
PLUGINS_DIR = os.path.join(FUSION_HOST_DIR, "plugins")
|
||||
PLUGINS_DIR = os.path.join(FUSION_ADDON_ROOT, "plugins")
|
||||
|
||||
PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish")
|
||||
LOAD_PATH = os.path.join(PLUGINS_DIR, "load")
|
||||
|
|
|
|||
|
|
@ -5,10 +5,9 @@ if sys.version_info < (3, 7):
|
|||
# hack to handle discrepancy between distributed libraries and Python 3.6
|
||||
# mostly because wrong version of urllib3
|
||||
# TODO remove when not necessary
|
||||
from ayon_core import AYON_CORE_ROOT
|
||||
FUSION_HOST_DIR = os.path.join(AYON_CORE_ROOT, "hosts", "fusion")
|
||||
from ayon_fusion import FUSION_ADDON_ROOT
|
||||
|
||||
vendor_path = os.path.join(FUSION_HOST_DIR, "vendor")
|
||||
vendor_path = os.path.join(FUSION_ADDON_ROOT, "vendor")
|
||||
if vendor_path not in sys.path:
|
||||
sys.path.insert(0, vendor_path)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
from ayon_applications import PreLaunchHook
|
||||
from ayon_fusion import FUSION_HOST_DIR
|
||||
from ayon_fusion import FUSION_ADDON_ROOT
|
||||
|
||||
|
||||
class FusionLaunchMenuHook(PreLaunchHook):
|
||||
|
|
@ -28,7 +28,7 @@ class FusionLaunchMenuHook(PreLaunchHook):
|
|||
"Validation for Fusion version 18+ for /execute "
|
||||
"prelaunch argument skipped.")
|
||||
|
||||
path = os.path.join(FUSION_HOST_DIR,
|
||||
path = os.path.join(FUSION_ADDON_ROOT,
|
||||
"deploy",
|
||||
"MenuScripts",
|
||||
"launch_menu.py").replace("\\", "/")
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import shutil
|
|||
import platform
|
||||
from pathlib import Path
|
||||
from ayon_fusion import (
|
||||
FUSION_HOST_DIR,
|
||||
FUSION_ADDON_ROOT,
|
||||
FUSION_VERSIONS_DICT,
|
||||
get_fusion_version,
|
||||
)
|
||||
|
|
@ -163,7 +163,7 @@ class FusionCopyPrefsPrelaunch(PreLaunchHook):
|
|||
master_prefs_variable = f"FUSION{profile_version}_MasterPrefs"
|
||||
|
||||
master_prefs = Path(
|
||||
FUSION_HOST_DIR, "deploy", "ayon", "fusion_shared.prefs")
|
||||
FUSION_ADDON_ROOT, "deploy", "ayon", "fusion_shared.prefs")
|
||||
|
||||
self.log.info(f"Setting {master_prefs_variable}: {master_prefs}")
|
||||
self.launch_context.env[master_prefs_variable] = str(master_prefs)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from ayon_applications import (
|
|||
ApplicationLaunchFailed,
|
||||
)
|
||||
from ayon_fusion import (
|
||||
FUSION_HOST_DIR,
|
||||
FUSION_ADDON_ROOT,
|
||||
FUSION_VERSIONS_DICT,
|
||||
get_fusion_version,
|
||||
)
|
||||
|
|
@ -67,5 +67,5 @@ class FusionPrelaunch(PreLaunchHook):
|
|||
# for hook installing PySide2
|
||||
self.data["fusion_python3_home"] = py3_dir
|
||||
|
||||
self.log.info(f"Setting AYON_FUSION_ROOT: {FUSION_HOST_DIR}")
|
||||
self.launch_context.env["AYON_FUSION_ROOT"] = FUSION_HOST_DIR
|
||||
self.log.info(f"Setting AYON_FUSION_ROOT: {FUSION_ADDON_ROOT}")
|
||||
self.launch_context.env["AYON_FUSION_ROOT"] = FUSION_ADDON_ROOT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue