Skip to content

Commit

Permalink
Don't delete material_0 texture if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKaravaev committed Mar 26, 2024
1 parent d79ae3a commit 2732824
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion obj2mjcf/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ def process_obj(filename: Path, args: Args) -> None:

# Delete any MTL files that were created during trimesh processing, if any.
for file in [
x for x in work_dir.glob("**/*") if x.is_file() and "material_0" in x.name
x
for x in work_dir.glob("**/*")
if x.is_file() and "material_0" in x.name and not x.name.endswith(".png")
]:
file.unlink()

Expand Down

0 comments on commit 2732824

Please sign in to comment.