Bases: FtrackPublishContextPlugin
Collect default Royal Render path.
Source code in client/ayon_ftrack/plugins/publish/collect_local_ftrack_creds.py
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 | class CollectLocalFtrackCreds(plugin.FtrackPublishContextPlugin):
"""Collect default Royal Render path."""
order = pyblish.api.CollectorOrder + 0.01
label = "Collect local ftrack credentials"
targets = ["rr_control"]
def process(self, context):
if (
os.getenv("FTRACK_API_USER")
and os.getenv("FTRACK_API_KEY")
and os.getenv("FTRACK_SERVER")
):
return
addon = context.data["ayonAddonsManager"].get("ftrack")
if addon.enabled:
creds = addon.get_credentials()
username, api_key = creds
os.environ["FTRACK_API_USER"] = username
os.environ["FTRACK_API_KEY"] = api_key
os.environ["FTRACK_SERVER"] = addon.ftrack_url
|