mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
Support tagging unwanted representations for deletion.
This commit is contained in:
parent
5547cec38c
commit
ca2baae479
2 changed files with 11 additions and 2 deletions
|
|
@ -82,10 +82,19 @@ class ExtractBurnin(pype.api.Extractor):
|
|||
if os.path.exists(full_burnin_path):
|
||||
repre_update = {
|
||||
"files": movieFileBurnin,
|
||||
"name": repre["name"]
|
||||
"name": repre["name"],
|
||||
"tags": [x for x in repre["tags"] if x != "delete"]
|
||||
}
|
||||
instance.data["representations"][i].update(repre_update)
|
||||
|
||||
# removing the source mov file
|
||||
os.remove(full_movie_path)
|
||||
self.log.debug("Removed: `{}`".format(full_movie_path))
|
||||
|
||||
# Remove any representations tagged for deletion.
|
||||
for repre in instance.data["representations"]:
|
||||
if "delete" in repre.get("tags", []):
|
||||
self.log.debug("Removing representation: {}".format(repre))
|
||||
instance.data["representations"].remove(repre)
|
||||
|
||||
self.log.debug(instance.data["representations"])
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class ExtractQuicktime(pype.api.Extractor):
|
|||
'endFrame': end,
|
||||
'frameRate': fps,
|
||||
'preview': True,
|
||||
'tags': ['review']
|
||||
'tags': ['review', 'delete']
|
||||
}
|
||||
instance.data["representations"].append(representation)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue