Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register host-specific Deadline plugins only on install of the host #6

Merged
19 changes: 15 additions & 4 deletions client/ayon_deadline/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
from .version import __version__


DEADLINE_ADDON_ROOT = os.path.dirname(os.path.abspath(__file__))


class DeadlineWebserviceError(Exception):
"""
Exception to throw when connection to Deadline server fails.
Expand Down Expand Up @@ -37,10 +40,18 @@ def initialize(self, studio_settings):

def get_plugin_paths(self):
"""Deadline plugin paths."""
current_dir = os.path.dirname(os.path.abspath(__file__))
return {
"publish": [os.path.join(current_dir, "plugins", "publish")]
}
# Note: We are not returning `publish` key because we have overridden
# `get_publish_plugin_paths` to return paths host-specific. However,
# `get_plugin_paths` still needs to be implemented because it's
# abstract on the parent class
return {}

def get_publish_plugin_paths(self, host_name=None):
publish_dir = os.path.join(DEADLINE_ADDON_ROOT, "plugins", "publish")
paths = [os.path.join(publish_dir, "global")]
if host_name:
paths.append(os.path.join(publish_dir, host_name))
return paths

@staticmethod
def get_deadline_pools(webservice, auth=None, log=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,10 @@ def _get_husk_standalone_plugin_info(self, instance, hou_major_minor):


class HoudiniSubmitDeadlineUsdRender(HoudiniSubmitDeadline):
label = "Submit Render to Deadline (USD)"
families = ["usdrender"]

# Do not use published workfile paths for USD Render ROP because the
# Export Job doesn't seem to occur using the published path either, so
# output paths then do not match the actual rendered paths
use_published = False
families = ["usdrender"]