mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #5502 from ynput/enhancement/persistant-staging-dir-at-representation
This commit is contained in:
commit
cc8cecbc04
1 changed files with 11 additions and 1 deletions
|
|
@ -952,6 +952,7 @@ def replace_with_published_scene_path(instance, replace_in_path=True):
|
|||
|
||||
return file_path
|
||||
|
||||
|
||||
def add_repre_files_for_cleanup(instance, repre):
|
||||
""" Explicitly mark repre files to be deleted.
|
||||
|
||||
|
|
@ -960,7 +961,16 @@ def add_repre_files_for_cleanup(instance, repre):
|
|||
"""
|
||||
files = repre["files"]
|
||||
staging_dir = repre.get("stagingDir")
|
||||
if not staging_dir or instance.data.get("stagingDir_persistent"):
|
||||
|
||||
# first make sure representation level is not persistent
|
||||
if (
|
||||
not staging_dir
|
||||
or repre.get("stagingDir_persistent")
|
||||
):
|
||||
return
|
||||
|
||||
# then look into instance level if it's not persistent
|
||||
if instance.data.get("stagingDir_persistent"):
|
||||
return
|
||||
|
||||
if isinstance(files, str):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue