Bases: HostBase
, IPublishHost
Source code in client/ayon_traypublisher/api/pipeline.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 | class TrayPublisherHost(HostBase, IPublishHost):
name = "traypublisher"
def install(self):
os.environ["AYON_HOST_NAME"] = self.name
pyblish.api.register_host("traypublisher")
def get_context_title(self):
return self.get_current_project_name()
def get_context_data(self):
return HostContext.get_context_data()
def update_context_data(self, data, changes):
HostContext.save_context_data(data)
def set_project_name(self, project_name: str):
"""Change project name.
DEPRECATED:
TrayPublisher now expects that project name is set before
is started, and is not possible to change project during
process lifetime.
"""
warnings.warn(
(
"'set_project_name' is deprecated and will be removed"
" in future versions of TrayPublisher addon."
" Project name should be set before TrayPublisher is started."
),
DeprecationWarning,
)
os.environ["AYON_PROJECT_NAME"] = project_name
|
set_project_name(project_name)
Change project name.
DEPRECATED
TrayPublisher now expects that project name is set before is started, and is not possible to change project during process lifetime.
Source code in client/ayon_traypublisher/api/pipeline.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 | def set_project_name(self, project_name: str):
"""Change project name.
DEPRECATED:
TrayPublisher now expects that project name is set before
is started, and is not possible to change project during
process lifetime.
"""
warnings.warn(
(
"'set_project_name' is deprecated and will be removed"
" in future versions of TrayPublisher addon."
" Project name should be set before TrayPublisher is started."
),
DeprecationWarning,
)
os.environ["AYON_PROJECT_NAME"] = project_name
|