Modify 3mf generation script

This commit is contained in:
Tomáš Batelka 2025-03-30 17:32:02 +02:00
parent 82c706350b
commit 4b0a171624

View file

@ -17,7 +17,10 @@ printed_3mf_dir = os.path.join(project_root, "3mf")
# Get the short hash of the current Git commit
git_short_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip()
# Create the 3mf directory if it doesn't exist
# Remove the existing 3MF directory if it exists and create a new one
if os.path.exists(printed_3mf_dir):
os.rmdir(printed_3mf_dir)
os.makedirs(printed_3mf_dir, exist_ok=True)
# List to keep track of files that failed to export