Skip to content

Commit

Permalink
fix dae and link animation export (#77)
Browse files Browse the repository at this point in the history
* fix dae export

* fix link animation export
  • Loading branch information
gmriggs authored Sep 6, 2023
1 parent 37031dd commit a3f6a15
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ACViewer/View/MainMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit a3f6a15

Please sign in to comment.