Skip to content

Commit

Permalink
SplitMDL: Removed all metadata information as part of a hotfix. This …
Browse files Browse the repository at this point in the history
…unfortunately means that character models will not be visible in SAMDL Project Mode until the issue is resolved.
  • Loading branch information
End-User-Person committed Nov 30, 2024
1 parent ee14ffa commit ed8e256
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions Libraries/SplitTools/SplitMDL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,38 +171,39 @@ public static void Split(string filePath, string outputFolder, string[] animatio
animlist.Add(rel);
}
}
// This section does not work as of November 2024. Reimplement when fixed.
// Model Labels
if (mdllabelfile != null)
{
mdlmetadata = mdlsplitfilenames[model.Key].Split('|'); // Filename|Description|Texture file
string outFilename = mdlmetadata[0];
if (mdlsplitfilenames[model.Key] == "NULL")
mdlsectionlist.Add(model.Key, "NULL");
string outResult = outFilename;
if (mdlmetadata.Length > 1)
outResult += ("|" + mdlmetadata[1]);
if (mdlmetadata.Length > 2)
outResult += ("|" + mdlmetadata[2]);
mdlsectionlist.Add(model.Key, outResult);
}
//if (mdllabelfile != null)
//{
// mdlmetadata = mdlsplitfilenames[model.Key].Split('|'); // Filename|Description|Texture file
// string outFilename = mdlmetadata[0];
// if (mdlsplitfilenames[model.Key] == "NULL")
// mdlsectionlist.Add(model.Key, "NULL");
// string outResult = outFilename;
// if (mdlmetadata.Length > 1)
// outResult += ("|" + mdlmetadata[1]);
// if (mdlmetadata.Length > 2)
// outResult += ("|" + mdlmetadata[2]);
// mdlsectionlist.Add(model.Key, outResult);
//}
// External motions for SAMDL Project Mode
if (exmtnfile != null && mtnsplitpaths.ContainsKey(model.Key))
{
exmtndata = mtnsplitpaths[model.Key].Split(','); // Assigns external motions based on model ID
animlist.AddRange(exmtndata);
}
//if (exmtnfile != null && mtnsplitpaths.ContainsKey(model.Key))
//{
// exmtndata = mtnsplitpaths[model.Key].Split(','); // Assigns external motions based on model ID
// animlist.AddRange(exmtndata);
//}

ModelFile.CreateFile(Path.Combine(Path.GetFileNameWithoutExtension(mdlfilename),
model.Key.ToString(NumberFormatInfo.InvariantInfo) + ".sa2mdl"), model.Value, animlist.ToArray(),
null, null, null, ModelFormat.Chunk);
}

// labels for SAMDL Project Mode
if (mdllabelfile != null)
{
string mdlsectionListFilename = Path.GetFileNameWithoutExtension(mdllabelfile) + "_data.ini";
IniSerializer.Serialize(mdlsectionlist, Path.Combine(outputFolder, mdlsectionListFilename));
}
//if (mdllabelfile != null)
//{
// string mdlsectionListFilename = Path.GetFileNameWithoutExtension(mdllabelfile) + "_data.ini";
// IniSerializer.Serialize(mdlsectionlist, Path.Combine(outputFolder, mdlsectionListFilename));
//}

//if (mtnlabelfile != null)
//{
Expand Down

0 comments on commit ed8e256

Please sign in to comment.