mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
fill os.env AVALON_ requirements before io.install() in templates
This commit is contained in:
parent
83660c78de
commit
c5e3ee55dd
2 changed files with 13 additions and 9 deletions
18
pype/lib.py
18
pype/lib.py
|
|
@ -442,16 +442,20 @@ def get_avalon_asset_template_schema():
|
|||
|
||||
def get_avalon_database():
|
||||
if io._database is None:
|
||||
project = os.environ.get('AVALON_PROJECT', '')
|
||||
asset = os.environ.get('AVALON_ASSET', '')
|
||||
silo = os.environ.get('AVALON_SILO', '')
|
||||
os.environ['AVALON_PROJECT'] = project
|
||||
os.environ['AVALON_ASSET'] = asset
|
||||
os.environ['AVALON_SILO'] = silo
|
||||
io.install()
|
||||
set_io_database()
|
||||
return io._database
|
||||
|
||||
|
||||
def set_io_database():
|
||||
project = os.environ.get('AVALON_PROJECT', '')
|
||||
asset = os.environ.get('AVALON_ASSET', '')
|
||||
silo = os.environ.get('AVALON_SILO', '')
|
||||
os.environ['AVALON_PROJECT'] = project
|
||||
os.environ['AVALON_ASSET'] = asset
|
||||
os.environ['AVALON_SILO'] = silo
|
||||
io.install()
|
||||
|
||||
|
||||
def get_all_avalon_projects():
|
||||
db = get_avalon_database()
|
||||
project_names = db.collection_names()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue