mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
use 'AYON_TMPDIR' instead of 'OPENPYPE_TMPDIR'
This commit is contained in:
parent
6a0e4b5f71
commit
9a3f4c92b3
2 changed files with 10 additions and 4 deletions
|
|
@ -623,7 +623,7 @@ def get_instance_staging_dir(instance):
|
|||
First check if 'stagingDir' is already set in instance data.
|
||||
In case there already is new tempdir will not be created.
|
||||
|
||||
It also supports `OPENPYPE_TMPDIR`, so studio can define own temp
|
||||
It also supports `AYON_TMPDIR`, so studio can define own temp
|
||||
shared repository per project or even per more granular context.
|
||||
Template formatting is supported also with optional keys. Folder is
|
||||
created in case it doesn't exists.
|
||||
|
|
@ -649,7 +649,7 @@ def get_instance_staging_dir(instance):
|
|||
|
||||
anatomy = instance.context.data.get("anatomy")
|
||||
|
||||
# get customized tempdir path from `OPENPYPE_TMPDIR` env var
|
||||
# get customized tempdir path from `AYON_TMPDIR` env var
|
||||
custom_temp_dir = tempdir.create_custom_tempdir(
|
||||
anatomy.project_name, anatomy)
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,15 @@ def create_custom_tempdir(project_name, anatomy=None):
|
|||
Returns:
|
||||
str | None: formatted path or None
|
||||
"""
|
||||
env_tmpdir = os.getenv("OPENPYPE_TMPDIR")
|
||||
env_tmpdir = os.getenv("AYON_TMPDIR")
|
||||
if not env_tmpdir:
|
||||
return
|
||||
env_tmpdir = os.getenv("OPENPYPE_TMPDIR")
|
||||
if not env_tmpdir:
|
||||
return
|
||||
print(
|
||||
"DEPRECATION WARNING: Used 'OPENPYPE_TMPDIR' environment"
|
||||
" variable. Please use 'AYON_TMPDIR' instead."
|
||||
)
|
||||
|
||||
custom_tempdir = None
|
||||
if "{" in env_tmpdir:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue