Skip to content

Commit 4a32112

Browse files
committed
Add more descriptive error message when failing to apply original shape data
1 parent c5707ff commit 4a32112

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

xivModdingFramework/Models/Helpers/ModelModifiers.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,14 @@ public void Apply(TTModel ttModel, XivMdl currentMdl = null, XivMdl originalMdl
133133
throw new Exception("Cannot copy settings from null MDL.");
134134
}
135135
ModelModifiers.ClearShapeData(ttModel, loggingFunction);
136-
ModelModifiers.MergeShapeData(ttModel, originalMdl, loggingFunction);
136+
try
137+
{
138+
ModelModifiers.MergeShapeData(ttModel, originalMdl, loggingFunction);
139+
}
140+
catch
141+
{
142+
throw new Exception("Failed to apply the original shape data.\nThis is likely due to changes to the original model without preserving the vertices' order.");
143+
}
137144
}
138145

139146
if (AutoScale)

0 commit comments

Comments
 (0)