mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
added cleanup method that will remove temp image files of individial layers
This commit is contained in:
parent
a2e2d1fb3f
commit
5779158d34
1 changed files with 6 additions and 0 deletions
|
|
@ -242,6 +242,7 @@ class ExtractSequence(pyblish.api.Extractor):
|
|||
filename_template,
|
||||
thumbnail_filename
|
||||
)
|
||||
self._cleanup_tmp_files(files_by_position)
|
||||
return output
|
||||
|
||||
def render_layer(
|
||||
|
|
@ -476,6 +477,11 @@ class ExtractSequence(pyblish.api.Extractor):
|
|||
|
||||
return output_filepaths, thumbnail_filepath
|
||||
|
||||
def _cleanup_tmp_files(self, files_by_position):
|
||||
for data in files_by_position.values():
|
||||
for filepath in data.values():
|
||||
os.remove(filepath)
|
||||
|
||||
def _copy_image(self, src_path, dst_path):
|
||||
# Create hardlink of image instead of copying if possible
|
||||
if hasattr(os, "link"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue