forked from Open-Industry-Project/Open-Industry-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrim.py
More file actions
27 lines (22 loc) · 789 Bytes
/
trim.py
File metadata and controls
27 lines (22 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
# These models are being imported directly as Scenes.
# (Importing as Scene allows Godot to generate LODs.)
KEEP = [
"ConveyorRollerBaseSplit",
"ConveyorRollerEndSplit",
"ConveyorRollerRollerSplit",
]
script_dir = os.path.dirname(os.path.abspath(__file__))
def delete_files(extension):
for root, dirs, files in os.walk(script_dir):
for file in files:
if file.endswith(extension):
file_path = os.path.join(root, file)
if file.removesuffix(extension) in KEEP:
print(f"Skipping {file_path}")
continue
print(f"Deleting {file_path}")
os.remove(file_path)
delete_files(".glb")
delete_files(".glb.import")
print("Project has been trimmed.")