mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
renamed 'HOST_DIR to 'FLAME_ADDON_ROOT'
This commit is contained in:
parent
6bd274df24
commit
7ad67f57b9
5 changed files with 13 additions and 12 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
from .addon import (
|
from .addon import (
|
||||||
HOST_DIR,
|
FLAME_ADDON_ROOT,
|
||||||
FlameAddon,
|
FlameAddon,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
"HOST_DIR",
|
"FLAME_ADDON_ROOT",
|
||||||
"FlameAddon",
|
"FlameAddon",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import os
|
import os
|
||||||
from ayon_core.addon import AYONAddon, IHostAddon
|
from ayon_core.addon import AYONAddon, IHostAddon
|
||||||
|
|
||||||
HOST_DIR = os.path.dirname(os.path.abspath(__file__))
|
FLAME_ADDON_ROOT = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
|
|
||||||
class FlameAddon(AYONAddon, IHostAddon):
|
class FlameAddon(AYONAddon, IHostAddon):
|
||||||
|
|
@ -10,7 +10,7 @@ class FlameAddon(AYONAddon, IHostAddon):
|
||||||
|
|
||||||
def add_implementation_envs(self, env, _app):
|
def add_implementation_envs(self, env, _app):
|
||||||
# Add requirements to DL_PYTHON_HOOK_PATH
|
# Add requirements to DL_PYTHON_HOOK_PATH
|
||||||
env["DL_PYTHON_HOOK_PATH"] = os.path.join(HOST_DIR, "startup")
|
env["DL_PYTHON_HOOK_PATH"] = os.path.join(FLAME_ADDON_ROOT, "startup")
|
||||||
env.pop("QT_AUTO_SCREEN_SCALE_FACTOR", None)
|
env.pop("QT_AUTO_SCREEN_SCALE_FACTOR", None)
|
||||||
|
|
||||||
# Set default values if are not already set via settings
|
# Set default values if are not already set via settings
|
||||||
|
|
@ -25,7 +25,7 @@ class FlameAddon(AYONAddon, IHostAddon):
|
||||||
if app.host_name != self.host_name:
|
if app.host_name != self.host_name:
|
||||||
return []
|
return []
|
||||||
return [
|
return [
|
||||||
os.path.join(HOST_DIR, "hooks")
|
os.path.join(FLAME_ADDON_ROOT, "hooks")
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_workfile_extensions(self):
|
def get_workfile_extensions(self):
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ from ayon_core.pipeline import (
|
||||||
deregister_creator_plugin_path,
|
deregister_creator_plugin_path,
|
||||||
AVALON_CONTAINER_ID,
|
AVALON_CONTAINER_ID,
|
||||||
)
|
)
|
||||||
|
from ayon_flame import FLAME_ADDON_ROOT
|
||||||
from .lib import (
|
from .lib import (
|
||||||
set_segment_data_marker,
|
set_segment_data_marker,
|
||||||
set_publish_attribute,
|
set_publish_attribute,
|
||||||
|
|
@ -20,10 +21,8 @@ from .lib import (
|
||||||
get_current_sequence,
|
get_current_sequence,
|
||||||
reset_segment_selection
|
reset_segment_selection
|
||||||
)
|
)
|
||||||
from .. import HOST_DIR
|
|
||||||
|
|
||||||
API_DIR = os.path.join(HOST_DIR, "api")
|
PLUGINS_DIR = os.path.join(FLAME_ADDON_ROOT, "plugins")
|
||||||
PLUGINS_DIR = os.path.join(HOST_DIR, "plugins")
|
|
||||||
PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish")
|
PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish")
|
||||||
LOAD_PATH = os.path.join(PLUGINS_DIR, "load")
|
LOAD_PATH = os.path.join(PLUGINS_DIR, "load")
|
||||||
CREATE_PATH = os.path.join(PLUGINS_DIR, "create")
|
CREATE_PATH = os.path.join(PLUGINS_DIR, "create")
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ Flame utils for syncing scripts
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from ayon_core.lib import Logger
|
from ayon_core.lib import Logger
|
||||||
|
from ayon_flame import FLAME_ADDON_ROOT
|
||||||
|
|
||||||
log = Logger.get_logger(__name__)
|
log = Logger.get_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -16,7 +18,6 @@ def _sync_utility_scripts(env=None):
|
||||||
`/opt/Autodesk/shared/python`. This will be always synchronizing those
|
`/opt/Autodesk/shared/python`. This will be always synchronizing those
|
||||||
folders.
|
folders.
|
||||||
"""
|
"""
|
||||||
from .. import HOST_DIR
|
|
||||||
|
|
||||||
env = env or os.environ
|
env = env or os.environ
|
||||||
|
|
||||||
|
|
@ -26,7 +27,7 @@ def _sync_utility_scripts(env=None):
|
||||||
flame_shared_dir = "/opt/Autodesk/shared/python"
|
flame_shared_dir = "/opt/Autodesk/shared/python"
|
||||||
|
|
||||||
fsd_paths = [os.path.join(
|
fsd_paths = [os.path.join(
|
||||||
HOST_DIR,
|
FLAME_ADDON_ROOT,
|
||||||
"api",
|
"api",
|
||||||
"utility_scripts"
|
"utility_scripts"
|
||||||
)]
|
)]
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ from ayon_core.lib import (
|
||||||
run_subprocess,
|
run_subprocess,
|
||||||
)
|
)
|
||||||
from ayon_applications import PreLaunchHook, LaunchTypes
|
from ayon_applications import PreLaunchHook, LaunchTypes
|
||||||
from ayon_core.hosts import flame as opflame
|
from ayon_flame import FLAME_ADDON_ROOT
|
||||||
|
|
||||||
|
|
||||||
class FlamePrelaunch(PreLaunchHook):
|
class FlamePrelaunch(PreLaunchHook):
|
||||||
|
|
@ -23,7 +23,8 @@ class FlamePrelaunch(PreLaunchHook):
|
||||||
permissions = 0o777
|
permissions = 0o777
|
||||||
|
|
||||||
wtc_script_path = os.path.join(
|
wtc_script_path = os.path.join(
|
||||||
opflame.HOST_DIR, "api", "scripts", "wiretap_com.py")
|
FLAME_ADDON_ROOT, "api", "scripts", "wiretap_com.py"
|
||||||
|
)
|
||||||
launch_types = {LaunchTypes.local}
|
launch_types = {LaunchTypes.local}
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue