From 5cdefce22e377369d7c8eede0c78a6fb224b81de Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Thu, 16 Dec 2021 09:22:29 +0100 Subject: [PATCH] fix save obj material when not enabled wedge texcoords --- wrap/io_trimesh/io_material.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrap/io_trimesh/io_material.h b/wrap/io_trimesh/io_material.h index 9471a5bd..ea98446d 100644 --- a/wrap/io_trimesh/io_material.h +++ b/wrap/io_trimesh/io_material.h @@ -103,7 +103,7 @@ public: mtl.Tr = (float)(f.C()[3])/255.0f;//alpha } - if(m.textures.size() && f.WT(0).n() >=0 ) + if(m.textures.size() && HasPerWedgeTexCoord(m) && f.WT(0).n() >=0 ) mtl.map_Kd = m.textures[f.WT(0).n()]; else mtl.map_Kd = "";