Skip to content

Commit

Permalink
1.Add Support Spien Version 4.0.64,4.1.00.
Browse files Browse the repository at this point in the history
2.Fixed some memory usage bugs.
3.Spine atlas and json file can be drop in textbox now.
  • Loading branch information
jacky.han committed Aug 29, 2022
1 parent a64c9fd commit 79c6135
Show file tree
Hide file tree
Showing 122 changed files with 30,678 additions and 194 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ a tool can view spine files with different spine-runtimes version and export gif
* **3.7.94**
* **3.8.95**
* **4.0.31**
* **4.0.64**
* **4.1.00**
* Export animation to gif or png file.
* Can view Animation with different options.

Expand Down
2 changes: 2 additions & 0 deletions README_zhTW.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
* **3.7.94**
* **3.8.95**
* **4.0.31**
* **4.0.64**
* **4.1.00**
* 將Spine動畫匯出成png或gif。
* 能用不同功能選項瀏覽Spine動畫。

Expand Down
4 changes: 2 additions & 2 deletions SpineViewerWPF/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// 您可以指定所有的值,或將組建編號或修訂編號設為預設值
// 指定為預設值:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.1.0")]
[assembly: AssemblyFileVersion("2.3.1.0")]
[assembly: AssemblyVersion("2.4.0.0")]
[assembly: AssemblyFileVersion("2.4.0.0")]
14 changes: 11 additions & 3 deletions SpineViewerWPF/PublicFunction/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ public static void SaveToGif(List<MemoryStream> lms, float time = 0)
fileName += $"_{App.globalValues.SelectSkin}";

saveFileDialog.FileName = fileName;
saveFileDialog.ShowDialog();
if (saveFileDialog.ShowDialog() == false)
{
return;
}
int delay = 0;
if (time == 0)
{
Expand Down Expand Up @@ -216,7 +219,7 @@ public static void SaveToGif(List<MemoryStream> lms, float time = 0)
{
gif.SaveAsGif(fs, new GifEncoder() { ColorTableMode = GifColorTableMode.Global });
}

gif.Dispose();
}
else
{
Expand Down Expand Up @@ -248,7 +251,10 @@ public static void SaveToGif2(float time = 0)
fileName += $"_{App.globalValues.SelectSkin}";

saveFileDialog.FileName = fileName;
saveFileDialog.ShowDialog();
if(saveFileDialog.ShowDialog() == false )
{
return;
}

string[] pngList = Directory.GetFiles($"{App.rootDir}\\Temp\\", "*.png",SearchOption.TopDirectoryOnly);

Expand Down Expand Up @@ -293,6 +299,7 @@ public static void SaveToGif2(float time = 0)
{
gif.SaveAsGif(fs,new GifEncoder() { ColorTableMode = GifColorTableMode.Global});
}
gif.Dispose();

}
else
Expand Down Expand Up @@ -411,6 +418,7 @@ public static void TakeScreenshot()
Texture2D texture = new Texture2D(_graphicsDevice, _graphicsDevice.PresentationParameters.BackBufferWidth, _graphicsDevice.PresentationParameters.BackBufferHeight, false, _graphicsDevice.PresentationParameters.BackBufferFormat);
texture.SetData(screenData);
Common.SaveToPng(texture);
texture.Dispose();
}
App.globalValues.TimeScale = bakTimeScale;
}
Expand Down
2 changes: 2 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/IPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ public interface IPlayer
void ChangeSet();

void SizeChange();

void Dispose();
}

6 changes: 6 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/Player_2_1_08.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,5 +202,11 @@ public void SizeChange()
if (App.graphicsDevice != null)
Player.UserControl_SizeChanged(ref App.graphicsDevice);
}

public void Dispose()
{
ChangeSet();
}

}

5 changes: 5 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/Player_2_1_25.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,5 +220,10 @@ public void SizeChange()
if (App.graphicsDevice != null)
Player.UserControl_SizeChanged(ref App.graphicsDevice);
}

public void Dispose()
{
ChangeSet();
}
}

5 changes: 5 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/Player_3_1_07.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,10 @@ public void SizeChange()
if (App.graphicsDevice != null)
Player.UserControl_SizeChanged(ref App.graphicsDevice);
}

public void Dispose()
{
ChangeSet();
}
}

5 changes: 5 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/Player_3_2_xx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,10 @@ public void SizeChange()
if (App.graphicsDevice != null)
Player.UserControl_SizeChanged(ref App.graphicsDevice);
}

public void Dispose()
{
ChangeSet();
}
}

5 changes: 5 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/Player_3_4_02.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,10 @@ public void SizeChange()
if (App.graphicsDevice != null)
Player.UserControl_SizeChanged(ref App.graphicsDevice);
}

public void Dispose()
{
ChangeSet();
}
}

5 changes: 5 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/Player_3_5_51.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,5 +220,10 @@ public void SizeChange()
if (App.graphicsDevice != null)
Player.UserControl_SizeChanged(ref App.graphicsDevice);
}

public void Dispose()
{
ChangeSet();
}
}

5 changes: 5 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/Player_3_6_32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,10 @@ public void SizeChange()
if (App.graphicsDevice != null)
Player.UserControl_SizeChanged(ref App.graphicsDevice);
}

public void Dispose()
{
ChangeSet();
}
}

5 changes: 5 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/Player_3_6_39.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,5 +213,10 @@ public void SizeChange()
if (App.graphicsDevice != null)
Player.UserControl_SizeChanged(ref App.graphicsDevice);
}

public void Dispose()
{
ChangeSet();
}
}

5 changes: 5 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/Player_3_6_53.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,10 @@ public void SizeChange()
if (App.graphicsDevice != null)
Player.UserControl_SizeChanged(ref App.graphicsDevice);
}

public void Dispose()
{
ChangeSet();
}
}

5 changes: 5 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/Player_3_7_94.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,10 @@ public void SizeChange()
if(App.graphicsDevice != null)
Player.UserControl_SizeChanged(ref App.graphicsDevice);
}

public void Dispose()
{
ChangeSet();
}
}

4 changes: 4 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/Player_3_8_95.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@ public void SizeChange()
Player.UserControl_SizeChanged(ref App.graphicsDevice);
}

public void Dispose()
{
ChangeSet();
}
}

4 changes: 4 additions & 0 deletions SpineViewerWPF/PublicFunction/Player/Player_4_0_31.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,9 @@ public void SizeChange()
Player.UserControl_SizeChanged(ref App.graphicsDevice);
}

public void Dispose()
{
ChangeSet();
}
}

Loading

0 comments on commit 79c6135

Please sign in to comment.