mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-25 14:00:21 +00:00
Apply the ftex instace on converted texture pattern animations
This commit is contained in:
parent
a03a852867
commit
128045ecb5
3 changed files with 10 additions and 3 deletions
Binary file not shown.
|
@ -146,7 +146,6 @@ namespace FirstPlugin
|
|||
if (entry.IsDirectory)
|
||||
{
|
||||
Directories[dir].AddNode(Directories[entry.Offset]);
|
||||
|
||||
_savedDirectories.Add(entry);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -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++)
|
||||
|
|
Loading…
Reference in a new issue