Skip to content

Commit 3f8fd38

Browse files
committed
Original SE model is always loaded now for shape data and size comparison.
1 parent 36cbad1 commit 3f8fd38

File tree

1 file changed

+11
-10
lines changed
  • xivModdingFramework/Models/FileTypes

1 file changed

+11
-10
lines changed

xivModdingFramework/Models/FileTypes/Mdl.cs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,16 +1920,17 @@ await Task.Run(async () =>
19201920
loggingFunction(false, "Merging in existing Attribute & Material Data...");
19211921

19221922
XivMdl ogMdl = null;
1923-
if (options.EnableShapeData && !ttModel.HasShapeData)
1923+
1924+
// Load the original model if we're actually going to need it.
1925+
var mod = await modding.TryGetModEntry(mdlPath);
1926+
if (mod != null)
19241927
{
1925-
// Load the original model if we're actually going to need it.
1926-
var mod = await modding.TryGetModEntry(mdlPath);
1927-
if (mod != null)
1928-
{
1929-
loggingFunction(false, "Loading original SE model to retrieve Shape Data...");
1930-
var ogOffset = mod.data.originalOffset;
1931-
ogMdl = await GetRawMdlData(item, IOUtil.GetRaceFromPath(mdlPath), submeshId, true);
1932-
}
1928+
loggingFunction(false, "Loading original SE model...");
1929+
var ogOffset = mod.data.originalOffset;
1930+
ogMdl = await GetRawMdlData(item, IOUtil.GetRaceFromPath(mdlPath), submeshId, true);
1931+
} else
1932+
{
1933+
ogMdl = currentMdl;
19331934
}
19341935

19351936
// Apply our Model Modifier options to the model.
@@ -1942,7 +1943,7 @@ await Task.Run(async () =>
19421943
loggingFunction(false, "Waiting on user...");
19431944

19441945
// Bool says whether or not we should continue.
1945-
var oldModel = TTModel.FromRaw(currentMdl);
1946+
var oldModel = TTModel.FromRaw(ogMdl);
19461947
bool cont = await intermediaryFunction(ttModel, oldModel);
19471948
if (!cont)
19481949
{

0 commit comments

Comments
 (0)