diff --git a/openpype/plugins/publish/collect_host_name.py b/openpype/plugins/publish/collect_host_name.py new file mode 100644 index 0000000000..897c50e4d8 --- /dev/null +++ b/openpype/plugins/publish/collect_host_name.py @@ -0,0 +1,21 @@ +""" +Requires: + None +Provides: + context -> host (str) +""" +import os +import pyblish.api + + +class CollectHostName(pyblish.api.ContextPlugin): + """Collect avalon host name to context.""" + + label = "Collect Host Name" + order = pyblish.api.CollectorOrder + + def process(self, context): + # Don't override value if is already set + host_name = context.data.get("host") + if not host_name: + context.data["host"] = os.environ.get("AVALON_APP")