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

Add support for multiple Deadline ☠️➖ servers #1905

Merged
merged 9 commits into from Aug 16, 2021

Conversation

antirotor
Copy link
Member

@antirotor antirotor commented Aug 5, 2021

Feature

This is adding support for multiple Deadline servers for OpenPype 3.

Changes in Settings

Deadline Module in System Settings now have ability to specify multiple keys for Deadline URLs. default is changeable but cannot be deleted and is used through pipeline if nothing else is defined.

In Project Settings -> Deadline there is now multiselect enum that allows setting specific Deadline Servers for project.

Publishing

It is up to Creator in specific host how it will handle this feature. Currently implemented in Maya it uses this code to get available servers for project:

from openpype.api import get_system_settings, get_project_settings
from openpype.modules import ModulesManager
from avalon.api import Session


deadline_settings = get_system_settings()["modules"]["deadline"]
if not deadline_settings["enabled"]:
    deadline_servers = {}
    return

project_settings = get_project_settings(Session["AVALON_PROJECT"])
try:
    default_servers = deadline_settings["deadline_urls"]
    project_servers = project_settings["deadline"]["deadline_servers"]
       
    deadline_servers = dict(
        (k, default_servers[k])
        for k in project_servers if k in default_servers)
        
except AttributeError:
    # Handle situation when we had only one url for deadline.
    manager = ModulesManager()
    deadline_module = manager.modules_by_name["deadline"]
    # get default deadline webservice url from deadline module
    deadline_url = deadline_module.deadline_url
    deadline_servers = {"default": deadline_url}

In the rest of the publishing pipeline - in publish plugins you can get default Deadline URL from context:

context.data["defaultDeadline"]

🗒️ this is now collected by new collector*

Support for this was added to all Deadline plugins but it needs host specific initial entry point (probably in render instance creator) to allow user to select desired server. That is currently implemented only in Maya.

Related to #1483

@antirotor antirotor changed the title Add support for multiple Deadline servers Add support for multiple Deadline ☠️ servers Aug 6, 2021
@antirotor antirotor changed the title Add support for multiple Deadline ☠️ servers Add support for multiple Deadline ☠️➖ servers Aug 6, 2021
@antirotor antirotor self-assigned this Aug 6, 2021
@antirotor antirotor added sponsored Client endorsed or requested host: Maya module: Deadline AWS Deadline related features labels Aug 6, 2021
@antirotor antirotor requested a review from mkolar August 6, 2021 13:13
@antirotor antirotor marked this pull request as ready for review August 6, 2021 13:13
get_asset)
from openpype.modules import ModulesManager

from avalon.api import Session


class CreateRender(plugin.Creator):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok to require access to deadline server to be able create render?

  • I can't create the instance in home and then send it to studio...

It seems there are added callbacks to changes of comboboxes (not sure as I couldn't create because of missing deadline). I'm not sure how callbacks would work after reopening scene?

@mkolar mkolar merged commit 1548727 into develop Aug 16, 2021
@mkolar mkolar deleted the feature/maya-multiple-deadline-servers branch September 17, 2021 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
host: Maya module: Deadline AWS Deadline related features sponsored Client endorsed or requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants