mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Use constant to define Asset path
This commit is contained in:
parent
28c1c2dbb6
commit
2f4844613e
9 changed files with 14 additions and 8 deletions
|
|
@ -30,6 +30,7 @@ import unreal # noqa
|
|||
logger = logging.getLogger("openpype.hosts.unreal")
|
||||
|
||||
AYON_CONTAINERS = "AyonContainers"
|
||||
AYON_ASSET_DIR = "/Game/Ayon/Assets"
|
||||
CONTEXT_CONTAINER = "Ayon/context.json"
|
||||
UNREAL_VERSION = semver.VersionInfo(
|
||||
*os.getenv("AYON_UNREAL_VERSION").split(".")
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class AnimationAlembicLoader(plugin.Loader):
|
|||
"""
|
||||
|
||||
# Create directory for asset and ayon container
|
||||
root = "/Game/Ayon/Assets"
|
||||
root = unreal_pipeline.AYON_ASSET_DIR
|
||||
asset = context.get('asset').get('name')
|
||||
suffix = "_CON"
|
||||
if asset:
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ from openpype.pipeline import (
|
|||
)
|
||||
from openpype.hosts.unreal.api import plugin
|
||||
from openpype.hosts.unreal.api.pipeline import (
|
||||
AYON_ASSET_DIR,
|
||||
create_container,
|
||||
imprint,
|
||||
)
|
||||
|
|
@ -24,7 +25,7 @@ class PointCacheAlembicLoader(plugin.Loader):
|
|||
icon = "cube"
|
||||
color = "orange"
|
||||
|
||||
root = "/Game/Ayon/Assets"
|
||||
root = AYON_ASSET_DIR
|
||||
|
||||
@staticmethod
|
||||
def get_task(
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ from openpype.pipeline import (
|
|||
)
|
||||
from openpype.hosts.unreal.api import plugin
|
||||
from openpype.hosts.unreal.api.pipeline import (
|
||||
AYON_ASSET_DIR,
|
||||
create_container,
|
||||
imprint,
|
||||
)
|
||||
|
|
@ -23,7 +24,7 @@ class SkeletalMeshAlembicLoader(plugin.Loader):
|
|||
icon = "cube"
|
||||
color = "orange"
|
||||
|
||||
root = "/Game/Ayon/Assets"
|
||||
root = AYON_ASSET_DIR
|
||||
|
||||
@staticmethod
|
||||
def get_task(filename, asset_dir, asset_name, replace, default_conversion):
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ from openpype.pipeline import (
|
|||
)
|
||||
from openpype.hosts.unreal.api import plugin
|
||||
from openpype.hosts.unreal.api.pipeline import (
|
||||
AYON_ASSET_DIR,
|
||||
create_container,
|
||||
imprint,
|
||||
)
|
||||
|
|
@ -23,7 +24,7 @@ class SkeletalMeshFBXLoader(plugin.Loader):
|
|||
icon = "cube"
|
||||
color = "orange"
|
||||
|
||||
root = "/Game/Ayon/Assets"
|
||||
root = AYON_ASSET_DIR
|
||||
|
||||
@staticmethod
|
||||
def get_task(filename, asset_dir, asset_name, replace):
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ from openpype.pipeline import (
|
|||
)
|
||||
from openpype.hosts.unreal.api import plugin
|
||||
from openpype.hosts.unreal.api.pipeline import (
|
||||
AYON_ASSET_DIR,
|
||||
create_container,
|
||||
imprint,
|
||||
)
|
||||
|
|
@ -23,7 +24,7 @@ class StaticMeshAlembicLoader(plugin.Loader):
|
|||
icon = "cube"
|
||||
color = "orange"
|
||||
|
||||
root = "/Game/Ayon/Assets"
|
||||
root = AYON_ASSET_DIR
|
||||
|
||||
@staticmethod
|
||||
def get_task(filename, asset_dir, asset_name, replace, default_conversion):
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ from openpype.pipeline import (
|
|||
)
|
||||
from openpype.hosts.unreal.api import plugin
|
||||
from openpype.hosts.unreal.api.pipeline import (
|
||||
AYON_ASSET_DIR,
|
||||
create_container,
|
||||
imprint,
|
||||
)
|
||||
|
|
@ -23,7 +24,7 @@ class StaticMeshFBXLoader(plugin.Loader):
|
|||
icon = "cube"
|
||||
color = "orange"
|
||||
|
||||
root = "/Game/Ayon/Assets"
|
||||
root = AYON_ASSET_DIR
|
||||
|
||||
@staticmethod
|
||||
def get_task(filename, asset_dir, asset_name, replace):
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class UAssetLoader(plugin.Loader):
|
|||
"""
|
||||
|
||||
# Create directory for asset and Ayon container
|
||||
root = "/Game/Ayon/Assets"
|
||||
root = unreal_pipeline.AYON_ASSET_DIR
|
||||
asset = context.get('asset').get('name')
|
||||
suffix = "_CON"
|
||||
asset_name = f"{asset}_{name}" if asset else f"{name}"
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class YetiLoader(plugin.Loader):
|
|||
raise RuntimeError("Groom plugin is not activated.")
|
||||
|
||||
# Create directory for asset and Ayon container
|
||||
root = "/Game/Ayon/Assets"
|
||||
root = unreal_pipeline.AYON_ASSET_DIR
|
||||
asset = context.get('asset').get('name')
|
||||
suffix = "_CON"
|
||||
asset_name = f"{asset}_{name}" if asset else f"{name}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue