mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Merge pull request #1066 from BigRoy/enhancement/custom_staging_dir_instance_data_custom
Store in instance data whether the staging dir set is a custom one
This commit is contained in:
commit
57dbd2827e
2 changed files with 6 additions and 2 deletions
|
|
@ -717,6 +717,7 @@ def get_instance_staging_dir(instance):
|
|||
instance.data.update({
|
||||
"stagingDir": staging_dir_path,
|
||||
"stagingDir_persistent": staging_dir_info.persistent,
|
||||
"stagingDir_custom": staging_dir_info.custom
|
||||
})
|
||||
|
||||
return staging_dir_path
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ from .tempdir import get_temp_dir
|
|||
class StagingDir:
|
||||
directory: str
|
||||
persistent: bool
|
||||
custom: bool # Whether the staging dir is a custom staging dir
|
||||
|
||||
|
||||
def get_staging_dir_config(
|
||||
|
|
@ -204,7 +205,8 @@ def get_staging_dir_info(
|
|||
dir_template = staging_dir_config["template"]["directory"]
|
||||
return StagingDir(
|
||||
dir_template.format_strict(ctx_data),
|
||||
staging_dir_config["persistence"],
|
||||
persistent=staging_dir_config["persistence"],
|
||||
custom=True
|
||||
)
|
||||
|
||||
# no config found but force an output
|
||||
|
|
@ -216,7 +218,8 @@ def get_staging_dir_info(
|
|||
prefix=prefix,
|
||||
suffix=suffix,
|
||||
),
|
||||
False,
|
||||
persistent=False,
|
||||
custom=False
|
||||
)
|
||||
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue