Add TxtRepl metadata to materials
This commit is contained in:
parent
047c2a1305
commit
ab34a78739
|
@ -63,10 +63,20 @@ public class ModelLoader
|
||||||
GD.Print($"Failed to load model texture: {material.Name}");
|
GD.Print($"Failed to load model texture: {material.Name}");
|
||||||
}
|
}
|
||||||
|
|
||||||
materials.Add(new StandardMaterial3D
|
var mat = new StandardMaterial3D
|
||||||
{
|
{
|
||||||
AlbedoTexture = TextureLoader.LoadTexture(path)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue