mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-06 12:55:10 +00:00
SkinModelImporter - Fix bottom texture swaping being done bofre parts where imported
This commit is contained in:
@@ -86,13 +86,6 @@ namespace PckStudio.Internal
|
||||
SkinAnimMask.LEFT_LEG_DISABLED |
|
||||
SkinAnimMask.LEFT_LEG_OVERLAY_DISABLED);
|
||||
|
||||
if (blockBenchModel.Textures.IndexInRange(0))
|
||||
{
|
||||
modelInfo.Texture = blockBenchModel.Textures[0];
|
||||
modelInfo.Texture = SwapBoxBottomTexture(modelInfo);
|
||||
modelInfo.ANIM = modelInfo.ANIM.SetFlag(SkinAnimFlag.RESOLUTION_64x64, modelInfo.Texture.Size.Width == modelInfo.Texture.Size.Height);
|
||||
}
|
||||
|
||||
IEnumerable<SkinPartOffset> partOffsets = blockBenchModel.Outliner
|
||||
.Where(token => token.Type == JTokenType.Object && SkinBOX.IsValidType(TryConvertToSkinBoxType(token.ToObject<Outline>().Name)))
|
||||
.Select(token => token.ToObject<Outline>())
|
||||
@@ -123,6 +116,14 @@ namespace PckStudio.Internal
|
||||
.DefaultIfEmpty()
|
||||
.Aggregate((a, b) => a | b);
|
||||
|
||||
|
||||
if (blockBenchModel.Textures.IndexInRange(0))
|
||||
{
|
||||
modelInfo.Texture = blockBenchModel.Textures[0];
|
||||
modelInfo.Texture = SwapBoxBottomTexture(modelInfo);
|
||||
modelInfo.ANIM = modelInfo.ANIM.SetFlag(SkinAnimFlag.RESOLUTION_64x64, modelInfo.Texture.Size.Width == modelInfo.Texture.Size.Height);
|
||||
}
|
||||
|
||||
if (mask != SkinAnimMask.NONE)
|
||||
modelInfo.ANIM &= ~mask;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user