Apply the ftex instace on converted texture pattern animations

This commit is contained in:
KillzXGaming 2019-07-25 19:28:52 -04:00
parent a03a852867
commit 128045ecb5
3 changed files with 10 additions and 3 deletions

Binary file not shown.

View file

@ -146,7 +146,6 @@ namespace FirstPlugin
if (entry.IsDirectory)
{
Directories[dir].AddNode(Directories[entry.Offset]);
_savedDirectories.Add(entry);
}
else

View file

@ -152,8 +152,16 @@ namespace FirstPlugin
//Fill both lists. On save only one will be used depending on version
foreach (var texName in materialAnim.TextureNames)
{
texPatternAnim.TextureRefNames.Add(new ResU.TextureRef() { Name = texName });
texPatternAnim.TextureRefs.Add(texName, new ResU.TextureRef() { Name = texName });
var textureRef = new ResU.TextureRef();
foreach (var container in PluginRuntime.ftexContainers) {
if (container.ResourceNodes.ContainsKey(texName)) {
textureRef.Texture = ((Bfres.Structs.FTEX)container.ResourceNodes[texName]).texture;
}
}
textureRef.Name = texName;
texPatternAnim.TextureRefNames.Add(textureRef);
texPatternAnim.TextureRefs.Add(texName, textureRef);
}
for (int m = 0; m < materialAnim.MaterialAnimDataList.Count; m++)