mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2025-02-16 22:08:26 +00:00
Some texture map fixes for g1m dae exporting
This commit is contained in:
parent
4a1c51737d
commit
99306683d0
4 changed files with 12 additions and 3 deletions
|
@ -94,7 +94,7 @@ namespace FirstPlugin
|
|||
for (int t = 0; t < Chunks[i].Textures.Count; t++)
|
||||
{
|
||||
var texWrapper = new TextureWrapper();
|
||||
texWrapper.Text = $"Texture {t}";
|
||||
texWrapper.Text = $"Texture_{t}";
|
||||
texWrapper.ImageKey = "texture";
|
||||
texWrapper.SelectedImageKey = texWrapper.ImageKey;
|
||||
|
||||
|
|
|
@ -99,8 +99,16 @@ namespace HyruleWarriors.G1M
|
|||
{
|
||||
get {
|
||||
List<STGenericMaterial> materials = new List<STGenericMaterial>();
|
||||
foreach (var mat in Model.Materials)
|
||||
foreach (var mat in Model.Materials) {
|
||||
materials.Add(mat);
|
||||
foreach (G1MTextureMap texMap in mat.TextureMaps)
|
||||
{
|
||||
var texList = TextureList;
|
||||
if (texList.Count > texMap.TextureIndex) {
|
||||
texMap.Name = texList[texMap.TextureIndex].Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
return materials;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ namespace HyruleWarriors.G1M
|
|||
genericMesh.PolygonGroups.Add(polyGroup);
|
||||
|
||||
var mat = Materials[(int)meshInfo.TextureID];
|
||||
mat.Text = $"Material_{meshInfo.TextureID}";
|
||||
mat.Diffuse.TextureIndex = mat.TextureIndices[0][0];
|
||||
polyGroup.Material = mat;
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace FirstPlugin
|
|||
GITextureWrapper tex = new GITextureWrapper(this);
|
||||
tex.ImageKey = "texture";
|
||||
tex.SelectedImageKey = tex.ImageKey;
|
||||
tex.Text = $"Texture {i} {format.ToString("x")}";
|
||||
tex.Text = $"Texture_{i}";
|
||||
tex.Width = Width;
|
||||
tex.Height = Height;
|
||||
tex.MipCount = (uint)mipSys >> 4;
|
||||
|
|
Loading…
Add table
Reference in a new issue