Set output default to subfolder of current date "%m-%d-%Y" to help better organize output.

This commit is contained in:
andrewtvuong 2024-05-03 22:30:44 -07:00
parent daa92a8ff4
commit 1f3d60f8b4

View File

@ -242,9 +242,10 @@ def get_save_image_path(filename_prefix, output_dir, image_width=0, image_height
input = input.replace("%height%", str(image_height)) input = input.replace("%height%", str(image_height))
return input return input
current_date = time.strftime("%m-%d-%Y")
filename_prefix = compute_vars(filename_prefix, image_width, image_height) filename_prefix = compute_vars(filename_prefix, image_width, image_height)
subfolder = os.path.dirname(os.path.normpath(filename_prefix)) subfolder = current_date
filename = os.path.basename(os.path.normpath(filename_prefix)) filename = os.path.basename(os.path.normpath(filename_prefix))
full_output_folder = os.path.join(output_dir, subfolder) full_output_folder = os.path.join(output_dir, subfolder)