From af8735d70e8414cdc4a197324438ac8011bb366d Mon Sep 17 00:00:00 2001 From: AlexKaravaev Date: Tue, 26 Mar 2024 09:04:16 +0100 Subject: [PATCH] Don't delete material_0 texture if exists --- obj2mjcf/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obj2mjcf/cli.py b/obj2mjcf/cli.py index 93885f1..82beb63 100644 --- a/obj2mjcf/cli.py +++ b/obj2mjcf/cli.py @@ -243,7 +243,7 @@ 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()