diff --git a/openpype/hosts/maya/api/pipeline.py b/openpype/hosts/maya/api/pipeline.py index 0261694be2..836445a970 100644 --- a/openpype/hosts/maya/api/pipeline.py +++ b/openpype/hosts/maya/api/pipeline.py @@ -66,7 +66,7 @@ def install(): log.info("Installing callbacks ... ") register_event_callback("init", on_init) - if os.environ.get("HEADLESS_PUBLISH"): + if os.environ.get("OPENPYPE_REMOTE_PUBLISH"): # Maya launched on farm, lib.IS_HEADLESS might be triggered locally too # target "farm" == rendering on farm, expects OPENPYPE_PUBLISH_DATA # target "remote" == remote execution diff --git a/openpype/modules/deadline/plugins/publish/submit_maya_remote_publish_deadline.py b/openpype/modules/deadline/plugins/publish/submit_maya_remote_publish_deadline.py index c31052be07..4f82818d6d 100644 --- a/openpype/modules/deadline/plugins/publish/submit_maya_remote_publish_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_maya_remote_publish_deadline.py @@ -115,7 +115,7 @@ class MayaSubmitRemotePublishDeadline(openpype.api.Integrator): environment["OPENPYPE_REMOTE_JOB"] = "1" environment["OPENPYPE_USERNAME"] = instance.context.data["user"] environment["OPENPYPE_PUBLISH_SUBSET"] = instance.data["subset"] - environment["HEADLESS_PUBLISH"] = "1" + environment["OPENPYPE_REMOTE_PUBLISH"] = "1" payload["JobInfo"].update({ "EnvironmentKeyValue%d" % index: "{key}={value}".format( diff --git a/openpype/pipeline/context_tools.py b/openpype/pipeline/context_tools.py index e849f5b0d1..c6e09cfba1 100644 --- a/openpype/pipeline/context_tools.py +++ b/openpype/pipeline/context_tools.py @@ -104,6 +104,14 @@ def install_host(host): MessageHandler.emit = modified_emit + if os.environ.get("OPENPYPE_REMOTE_PUBLISH"): + # target "farm" == rendering on farm, expects OPENPYPE_PUBLISH_DATA + # target "remote" == remote execution, installs host + print("Registering pyblish target: remote") + pyblish.api.register_target("remote") + else: + pyblish.api.register_target("local") + install_openpype_plugins() diff --git a/openpype/plugin.py b/openpype/plugin.py index f1ee626ffb..6637ad1d8b 100644 --- a/openpype/plugin.py +++ b/openpype/plugin.py @@ -23,7 +23,7 @@ class Integrator(InstancePlugin): Wraps pyblish instance plugin. Targets set to "local" which means all integrators should run on "local" publishes, by default. - "farm" targets could be used for integrators that should run on a farm. + "remote" targets could be used for integrators that should run externally. """ targets = ["local"]