mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
🐛 fix how AYON_UNREAL_PLUGIN overrides integration path
setting AYON_UNREAL_PLUGIN will override now inbuilt integration
This commit is contained in:
parent
8daed6fefc
commit
b72f8d89f0
1 changed files with 6 additions and 8 deletions
|
|
@ -17,7 +17,7 @@ class UnrealAddon(AYONAddon, IHostAddon):
|
|||
def add_implementation_envs(self, env, app):
|
||||
"""Modify environments to contain all required for implementation."""
|
||||
# Set AYON_UNREAL_PLUGIN required for Unreal implementation
|
||||
# Imports are in this method for Python 2 compatiblity of an addon
|
||||
# Imports are in this method for Python 2 compatibility of an addon
|
||||
from pathlib import Path
|
||||
|
||||
from .lib import get_compatible_integration
|
||||
|
|
@ -39,19 +39,17 @@ class UnrealAddon(AYONAddon, IHostAddon):
|
|||
raise ValueError(msg)
|
||||
|
||||
ue_version = app.name.replace("-", ".")
|
||||
|
||||
unreal_plugin_path = os.path.join(
|
||||
UNREAL_ROOT_DIR, "integration", "UE_{}".format(ue_version), "Ayon"
|
||||
)
|
||||
UNREAL_ROOT_DIR, "integration", f"UE_{ue_version}", "Ayon")
|
||||
if not Path(unreal_plugin_path).exists():
|
||||
compatible_versions = get_compatible_integration(
|
||||
if compatible_versions := get_compatible_integration(
|
||||
ue_version, Path(UNREAL_ROOT_DIR) / "integration"
|
||||
)
|
||||
if compatible_versions:
|
||||
):
|
||||
unreal_plugin_path = compatible_versions[-1] / "Ayon"
|
||||
unreal_plugin_path = unreal_plugin_path.as_posix()
|
||||
|
||||
if not env.get("AYON_UNREAL_PLUGIN") or \
|
||||
env.get("AYON_UNREAL_PLUGIN") != unreal_plugin_path:
|
||||
if not env.get("AYON_UNREAL_PLUGIN"):
|
||||
env["AYON_UNREAL_PLUGIN"] = unreal_plugin_path
|
||||
|
||||
# Set default environments if are not set via settings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue