From c386aeb2e83f8e484c19d373d57e6ff561ff14b7 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 9 Jul 2024 00:10:19 +0200 Subject: [PATCH] Fix #4: Register host-specific Deadline plugins only on install of the host --- client/ayon_deadline/addon.py | 9 +++++++++ .../{ => aftereffects}/submit_aftereffects_deadline.py | 0 .../publish/{ => blender}/submit_blender_deadline.py | 0 .../publish/{ => celaction}/submit_celaction_deadline.py | 0 .../publish/{ => fusion}/submit_fusion_deadline.py | 0 .../publish/{ => harmony}/submit_harmony_deadline.py | 0 .../{ => houdini}/submit_houdini_cache_deadline.py | 0 .../{ => houdini}/submit_houdini_render_deadline.py | 0 .../plugins/publish/{ => max}/submit_max_deadline.py | 0 .../plugins/publish/{ => maya}/submit_maya_deadline.py | 0 .../plugins/publish/{ => nuke}/submit_nuke_deadline.py | 0 11 files changed, 9 insertions(+) rename client/ayon_deadline/plugins/publish/{ => aftereffects}/submit_aftereffects_deadline.py (100%) rename client/ayon_deadline/plugins/publish/{ => blender}/submit_blender_deadline.py (100%) rename client/ayon_deadline/plugins/publish/{ => celaction}/submit_celaction_deadline.py (100%) rename client/ayon_deadline/plugins/publish/{ => fusion}/submit_fusion_deadline.py (100%) rename client/ayon_deadline/plugins/publish/{ => harmony}/submit_harmony_deadline.py (100%) rename client/ayon_deadline/plugins/publish/{ => houdini}/submit_houdini_cache_deadline.py (100%) rename client/ayon_deadline/plugins/publish/{ => houdini}/submit_houdini_render_deadline.py (100%) rename client/ayon_deadline/plugins/publish/{ => max}/submit_max_deadline.py (100%) rename client/ayon_deadline/plugins/publish/{ => maya}/submit_maya_deadline.py (100%) rename client/ayon_deadline/plugins/publish/{ => nuke}/submit_nuke_deadline.py (100%) diff --git a/client/ayon_deadline/addon.py b/client/ayon_deadline/addon.py index 87fc2ad665..c3e1728ed6 100644 --- a/client/ayon_deadline/addon.py +++ b/client/ayon_deadline/addon.py @@ -7,6 +7,8 @@ from ayon_core.lib import Logger from ayon_core.addon import AYONAddon, IPluginPaths +import pyblish.api + from .version import __version__ @@ -42,6 +44,13 @@ def get_plugin_paths(self): "publish": [os.path.join(current_dir, "plugins", "publish")] } + def on_host_install(self, host, host_name, project_name): + print(f"Registering deadline publish plug-ins for host {host_name}..") + # Register host-specific publish plugins + current_dir = os.path.dirname(os.path.abspath(__file__)) + path = os.path.join(current_dir, "plugins", "publish", host_name) + pyblish.api.register_plugin_path(path) + @staticmethod def get_deadline_pools(webservice, auth=None, log=None): """Get pools from Deadline. diff --git a/client/ayon_deadline/plugins/publish/submit_aftereffects_deadline.py b/client/ayon_deadline/plugins/publish/aftereffects/submit_aftereffects_deadline.py similarity index 100% rename from client/ayon_deadline/plugins/publish/submit_aftereffects_deadline.py rename to client/ayon_deadline/plugins/publish/aftereffects/submit_aftereffects_deadline.py diff --git a/client/ayon_deadline/plugins/publish/submit_blender_deadline.py b/client/ayon_deadline/plugins/publish/blender/submit_blender_deadline.py similarity index 100% rename from client/ayon_deadline/plugins/publish/submit_blender_deadline.py rename to client/ayon_deadline/plugins/publish/blender/submit_blender_deadline.py diff --git a/client/ayon_deadline/plugins/publish/submit_celaction_deadline.py b/client/ayon_deadline/plugins/publish/celaction/submit_celaction_deadline.py similarity index 100% rename from client/ayon_deadline/plugins/publish/submit_celaction_deadline.py rename to client/ayon_deadline/plugins/publish/celaction/submit_celaction_deadline.py diff --git a/client/ayon_deadline/plugins/publish/submit_fusion_deadline.py b/client/ayon_deadline/plugins/publish/fusion/submit_fusion_deadline.py similarity index 100% rename from client/ayon_deadline/plugins/publish/submit_fusion_deadline.py rename to client/ayon_deadline/plugins/publish/fusion/submit_fusion_deadline.py diff --git a/client/ayon_deadline/plugins/publish/submit_harmony_deadline.py b/client/ayon_deadline/plugins/publish/harmony/submit_harmony_deadline.py similarity index 100% rename from client/ayon_deadline/plugins/publish/submit_harmony_deadline.py rename to client/ayon_deadline/plugins/publish/harmony/submit_harmony_deadline.py diff --git a/client/ayon_deadline/plugins/publish/submit_houdini_cache_deadline.py b/client/ayon_deadline/plugins/publish/houdini/submit_houdini_cache_deadline.py similarity index 100% rename from client/ayon_deadline/plugins/publish/submit_houdini_cache_deadline.py rename to client/ayon_deadline/plugins/publish/houdini/submit_houdini_cache_deadline.py diff --git a/client/ayon_deadline/plugins/publish/submit_houdini_render_deadline.py b/client/ayon_deadline/plugins/publish/houdini/submit_houdini_render_deadline.py similarity index 100% rename from client/ayon_deadline/plugins/publish/submit_houdini_render_deadline.py rename to client/ayon_deadline/plugins/publish/houdini/submit_houdini_render_deadline.py diff --git a/client/ayon_deadline/plugins/publish/submit_max_deadline.py b/client/ayon_deadline/plugins/publish/max/submit_max_deadline.py similarity index 100% rename from client/ayon_deadline/plugins/publish/submit_max_deadline.py rename to client/ayon_deadline/plugins/publish/max/submit_max_deadline.py diff --git a/client/ayon_deadline/plugins/publish/submit_maya_deadline.py b/client/ayon_deadline/plugins/publish/maya/submit_maya_deadline.py similarity index 100% rename from client/ayon_deadline/plugins/publish/submit_maya_deadline.py rename to client/ayon_deadline/plugins/publish/maya/submit_maya_deadline.py diff --git a/client/ayon_deadline/plugins/publish/submit_nuke_deadline.py b/client/ayon_deadline/plugins/publish/nuke/submit_nuke_deadline.py similarity index 100% rename from client/ayon_deadline/plugins/publish/submit_nuke_deadline.py rename to client/ayon_deadline/plugins/publish/nuke/submit_nuke_deadline.py