mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
removed get_project_name
This commit is contained in:
parent
0ecb30338c
commit
399eda962d
2 changed files with 3 additions and 24 deletions
|
|
@ -20,7 +20,6 @@ from pypeapp import Logger
|
|||
|
||||
|
||||
from .templates import (
|
||||
get_project_name,
|
||||
get_hierarchy,
|
||||
get_asset,
|
||||
set_avalon_workdir,
|
||||
|
|
@ -60,7 +59,6 @@ __all__ = [
|
|||
"get_project_data",
|
||||
"get_asset_data",
|
||||
"get_project",
|
||||
"get_project_name",
|
||||
"get_hierarchy",
|
||||
"get_asset",
|
||||
"set_avalon_workdir",
|
||||
|
|
|
|||
|
|
@ -17,24 +17,6 @@ def set_session():
|
|||
self.SESSION = avalon.session
|
||||
|
||||
|
||||
def get_project_name():
|
||||
"""
|
||||
Obtain project name from environment variable
|
||||
|
||||
Returns:
|
||||
string: project name
|
||||
|
||||
"""
|
||||
if self.SESSION is None:
|
||||
set_session()
|
||||
project_name = self.SESSION.get("AVALON_PROJECT", None) \
|
||||
or os.getenv("AVALON_PROJECT", None)
|
||||
assert project_name, log.error("missing `AVALON_PROJECT`"
|
||||
"in avalon session "
|
||||
"or os.environ!")
|
||||
return project_name
|
||||
|
||||
|
||||
def get_asset():
|
||||
"""
|
||||
Obtain Asset string from session or environment variable
|
||||
|
|
@ -76,10 +58,9 @@ def get_hierarchy():
|
|||
return hierarchy
|
||||
|
||||
|
||||
def get_context_data(project=None,
|
||||
hierarchy=None,
|
||||
asset=None,
|
||||
task=None):
|
||||
def get_context_data(
|
||||
project_name=None, hierarchy=None, asset=None, task_name=None
|
||||
):
|
||||
"""
|
||||
Collect all main contextual data
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue