Add TxtRepl metadata to materials

This commit is contained in:
Jarrod Doyle 2024-08-31 11:59:54 +01:00
parent 047c2a1305
commit ab34a78739
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 12 additions and 2 deletions

View File

@ -63,10 +63,20 @@ public class ModelLoader
GD.Print($"Failed to load model texture: {material.Name}");
}
materials.Add(new StandardMaterial3D
var mat = new StandardMaterial3D
{
AlbedoTexture = TextureLoader.LoadTexture(path)
});
};
var name = material.Name.ToLower();
for (var i = 0; i < 4; i++)
{
if (name.Contains($"replace{i}"))
{
mat.SetMeta($"TxtRepl{i}", true);
}
}
materials.Add(mat);
}
else
{