mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 21:32:15 +01:00
added collector for avalon host name
This commit is contained in:
parent
b1c2f180ab
commit
b2c06b937b
1 changed files with 21 additions and 0 deletions
21
openpype/plugins/publish/collect_host_name.py
Normal file
21
openpype/plugins/publish/collect_host_name.py
Normal file
|
|
@ -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")
|
||||
Loading…
Add table
Add a link
Reference in a new issue