Skip to content

Commit 2eacfc6

Browse files
committed
make sure ayon plugins from fab is also working with the integration
1 parent 3bc740d commit 2eacfc6

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

client/ayon_unreal/ue_workers.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,17 +342,26 @@ def execute(self):
342342
raise RuntimeError(msg)
343343

344344
# Create a path to the plugin in the engine
345-
op_plugin_path = self.engine_path / "Engine/Plugins/Marketplace" \
346-
"/Ayon"
347-
345+
op_plugin_path = self.engine_path / "Engine/Plugins/Marketplace"
348346
if not op_plugin_path.is_dir():
349347
self.installing.emit("Installing and building the plugin ...")
350348
op_plugin_path.mkdir(parents=True, exist_ok=True)
351349

352-
engine_plugin_config_path = op_plugin_path / "Config"
353-
engine_plugin_config_path.mkdir(exist_ok=True)
350+
# Find the AYON plugin folder (handles FAB's randomized suffix)
351+
ayon_plugin_dir = None
352+
for item in op_plugin_path.iterdir():
353+
if item.is_dir() and item.name.lower().startswith("ayon"):
354+
ayon_plugin_dir = item
355+
break
356+
357+
if not ayon_plugin_dir:
358+
raise RuntimeError("AYON plugin not found in Marketplace directory!")
359+
360+
op_plugin_path = ayon_plugin_dir
361+
engine_plugin_config_path = op_plugin_path / "Config"
362+
engine_plugin_config_path.mkdir(exist_ok=True)
354363

355-
dir_util._path_created = {}
364+
dir_util._path_created = {}
356365

357366
if not (op_plugin_path / "Binaries").is_dir() \
358367
or not (op_plugin_path / "Intermediate").is_dir():

0 commit comments

Comments
 (0)