Some texture map fixes for g1m dae exporting
This commit is contained in:
parent
4a1c51737d
commit
99306683d0
@ -94,7 +94,7 @@ namespace FirstPlugin
|
|||||||
for (int t = 0; t < Chunks[i].Textures.Count; t++)
|
for (int t = 0; t < Chunks[i].Textures.Count; t++)
|
||||||
{
|
{
|
||||||
var texWrapper = new TextureWrapper();
|
var texWrapper = new TextureWrapper();
|
||||||
texWrapper.Text = $"Texture {t}";
|
texWrapper.Text = $"Texture_{t}";
|
||||||
texWrapper.ImageKey = "texture";
|
texWrapper.ImageKey = "texture";
|
||||||
texWrapper.SelectedImageKey = texWrapper.ImageKey;
|
texWrapper.SelectedImageKey = texWrapper.ImageKey;
|
||||||
|
|
||||||
|
@ -99,8 +99,16 @@ namespace HyruleWarriors.G1M
|
|||||||
{
|
{
|
||||||
get {
|
get {
|
||||||
List<STGenericMaterial> materials = new List<STGenericMaterial>();
|
List<STGenericMaterial> materials = new List<STGenericMaterial>();
|
||||||
foreach (var mat in Model.Materials)
|
foreach (var mat in Model.Materials) {
|
||||||
materials.Add(mat);
|
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;
|
return materials;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,7 @@ namespace HyruleWarriors.G1M
|
|||||||
genericMesh.PolygonGroups.Add(polyGroup);
|
genericMesh.PolygonGroups.Add(polyGroup);
|
||||||
|
|
||||||
var mat = Materials[(int)meshInfo.TextureID];
|
var mat = Materials[(int)meshInfo.TextureID];
|
||||||
|
mat.Text = $"Material_{meshInfo.TextureID}";
|
||||||
mat.Diffuse.TextureIndex = mat.TextureIndices[0][0];
|
mat.Diffuse.TextureIndex = mat.TextureIndices[0][0];
|
||||||
polyGroup.Material = mat;
|
polyGroup.Material = mat;
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ namespace FirstPlugin
|
|||||||
GITextureWrapper tex = new GITextureWrapper(this);
|
GITextureWrapper tex = new GITextureWrapper(this);
|
||||||
tex.ImageKey = "texture";
|
tex.ImageKey = "texture";
|
||||||
tex.SelectedImageKey = tex.ImageKey;
|
tex.SelectedImageKey = tex.ImageKey;
|
||||||
tex.Text = $"Texture {i} {format.ToString("x")}";
|
tex.Text = $"Texture_{i}";
|
||||||
tex.Width = Width;
|
tex.Width = Width;
|
||||||
tex.Height = Height;
|
tex.Height = Height;
|
||||||
tex.MipCount = (uint)mipSys >> 4;
|
tex.MipCount = (uint)mipSys >> 4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user