added helper function for copying files

This commit is contained in:
iLLiCiTiT 2021-11-04 19:11:54 +01:00
parent 2dddd974be
commit 2879c62b07

View file

@ -461,3 +461,11 @@ def fill_reference_frames(frame_references, filepaths_by_frame):
os.link(src_filepath, dst_filepath)
else:
shutil.copy(src_filepath, dst_filepath)
def copy_render_file(src_path, dst_path):
"""Create copy file of an image."""
if hasattr(os, "link"):
os.link(src_path, dst_path)
else:
shutil.copy(src_path, dst_path)