diff --git a/ACViewer/View/MainMenu.xaml.cs b/ACViewer/View/MainMenu.xaml.cs index 4338935..17e2795 100644 --- a/ACViewer/View/MainMenu.xaml.cs +++ b/ACViewer/View/MainMenu.xaml.cs @@ -155,7 +155,7 @@ private void Export_Click(object sender, RoutedEventArgs e) if (isModel && saveFileDialog.FilterIndex == 1) FileExport.ExportModel(selectedFileID, saveFilename); - else if (isModel && saveFileDialog.FilterIndex == 2) + else if (isModel && saveFileDialog.FilterIndex > 1) { // try to get animation id, if applicable var rawState = ModelViewer.Instance?.ViewObject?.PhysicsObj?.MovementManager?.MotionInterpreter?.RawState; @@ -167,7 +167,10 @@ private void Export_Click(object sender, RoutedEventArgs e) var didTable = DIDTables.Get(selectedFileID); // setup ID if (didTable != null) - motionData = ACE.Server.Physics.Animation.MotionTable.GetMotionData(didTable.MotionTableID, rawState.ForwardCommand, rawState.CurrentStyle); + { + motionData = ACE.Server.Physics.Animation.MotionTable.GetMotionData(didTable.MotionTableID, rawState.ForwardCommand, rawState.CurrentStyle) ?? + ACE.Server.Physics.Animation.MotionTable.GetLinkData(didTable.MotionTableID, rawState.ForwardCommand, rawState.CurrentStyle); + } } //FileExport.ExportModel_Aspose(selectedFileID, motionData, saveFilename);