diff --git a/PCK-Studio/Classes/Conversion/Bedrock/BedrockSkinExporter.cs b/PCK-Studio/Classes/Conversion/Bedrock/BedrockSkinExporter.cs index 7aa4867d..f915ffe7 100644 --- a/PCK-Studio/Classes/Conversion/Bedrock/BedrockSkinExporter.cs +++ b/PCK-Studio/Classes/Conversion/Bedrock/BedrockSkinExporter.cs @@ -343,6 +343,12 @@ namespace PckStudio.Conversion.Bedrock new GeometryBone("leftBootArmorOffset", "leftLeg", new Vector3(-2f, 12f - TryGetOffsetValue("BOOT1", offsets), 0f), null, "armor_offset") ); + var ANIM = SkinANIM.FromString(file.Properties.Find(o => o.Key == "ANIM").Value) ?? SkinANIM.Empty; + bool IsClassicRes = !(ANIM.GetFlag(ANIM_EFFECTS.RESOLUTION_64x64) || ANIM.GetFlag(ANIM_EFFECTS.SLIM_MODEL)); + + geometry.TextureWidth = 64; + geometry.TextureHeight = IsClassicRes ? 32 : 64; + string capepath = file.Properties.Find(o => o.Key == "CAPEPATH").Value; JToken geo = JToken.FromObject(geometry); diff --git a/PCK-Studio/Classes/Conversion/CommonJsonDefinitions/Geometry.cs b/PCK-Studio/Classes/Conversion/CommonJsonDefinitions/Geometry.cs index af81af5e..a302610d 100644 --- a/PCK-Studio/Classes/Conversion/CommonJsonDefinitions/Geometry.cs +++ b/PCK-Studio/Classes/Conversion/CommonJsonDefinitions/Geometry.cs @@ -92,6 +92,13 @@ namespace PckStudio.Conversion.Common.JsonDefinitions visibleBounds.Offset.CopyTo(VisibleBoundsOffset); } + // yeah the property name has no space, it's annoying - Matt + [JsonProperty("texturewidth")] + public int TextureWidth { get; set; } + + [JsonProperty("textureheight")] + public int TextureHeight { get; set; } + [JsonProperty("visible_bounds_width")] public int VisibleBoundsWidth { get; set; }