mirror of
https://github.com/4sval/FModel.git
synced 2026-08-06 03:03:04 -05:00
close #479
This commit is contained in:
parent
9c50e2b7d7
commit
c6383a1d22
|
|
@ -1 +1 @@
|
|||
Subproject commit e3b7b22285ed7cabc4524949dcd753e3abd2b69e
|
||||
Subproject commit 500670ad0afa308441aca03587e18b437ca6c385
|
||||
|
|
@ -240,18 +240,31 @@ public class TabItem : ViewModel
|
|||
|
||||
public void AddImage(UTexture texture, bool save, bool updateUi)
|
||||
{
|
||||
var img = texture.Decode(UserSettings.Default.CurrentDir.TexturePlatform);
|
||||
if (texture is UTextureCube)
|
||||
var appendLayerNumber = false;
|
||||
var img = new SKBitmap[1];
|
||||
if (texture is UTexture2DArray textureArray)
|
||||
{
|
||||
img = img?.ToPanorama();
|
||||
img = textureArray.DecodeTextureArray(UserSettings.Default.CurrentDir.TexturePlatform);
|
||||
appendLayerNumber = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
img[0] = texture.Decode(UserSettings.Default.CurrentDir.TexturePlatform);
|
||||
if (texture is UTextureCube)
|
||||
{
|
||||
img[0] = img[0]?.ToPanorama();
|
||||
}
|
||||
}
|
||||
|
||||
AddImage(texture.Name, texture.RenderNearestNeighbor, img, save, updateUi);
|
||||
AddImage(texture.Name, texture.RenderNearestNeighbor, img, save, updateUi, appendLayerNumber);
|
||||
}
|
||||
|
||||
public void AddImage(string name, bool rnn, SKBitmap[] img, bool save, bool updateUi)
|
||||
public void AddImage(string name, bool rnn, SKBitmap[] img, bool save, bool updateUi, bool appendLayerNumber = false)
|
||||
{
|
||||
foreach (var i in img) AddImage(name, rnn, i, save, updateUi);
|
||||
for (var i = 0; i < img.Length; i++)
|
||||
{
|
||||
AddImage($"{name}{(appendLayerNumber ? $"_{i}" : "")}", rnn, img[i], save, updateUi);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddImage(string name, bool rnn, SKBitmap img, bool save, bool updateUi)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user