From e66fe5f42ed7232c9b52e6531a8fd71c74199e23 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Sun, 24 Mar 2024 16:53:07 +0100 Subject: [PATCH] CustomSkinEditor - Remove JSONToCSM function --- PCK-Studio/Forms/Editor/CustomSkinEditor.cs | 60 --------------------- 1 file changed, 60 deletions(-) diff --git a/PCK-Studio/Forms/Editor/CustomSkinEditor.cs b/PCK-Studio/Forms/Editor/CustomSkinEditor.cs index 701e3562..d549a316 100644 --- a/PCK-Studio/Forms/Editor/CustomSkinEditor.cs +++ b/PCK-Studio/Forms/Editor/CustomSkinEditor.cs @@ -238,33 +238,6 @@ namespace PckStudio.Forms.Editor } } - [Obsolete("Will be removed")] - public string JSONToCSM(string inputJson) - { - CSMJObject jsonDe = JsonConvert.DeserializeObject(inputJson); - StringBuilder sb = new StringBuilder(); - foreach (CSMJObjectGroup group in jsonDe.Groups) - { - string PARENT = group.Name; - foreach (int i in group.children) - { - CSMJObjectElement element = jsonDe.Elements[i]; - string name = element.Name; - float PosX = element.from[0] + group.origin[0]; - float PosY = element.from[1] + group.origin[1]; - float PosZ = element.from[2] + group.origin[2]; - float SizeX = element.to[0] - element.from[0]; - float SizeY = element.to[1] - element.from[1]; - float SizeZ = element.to[2] - element.from[2]; - float U = 0; - float V = 0; - - sb.AppendLine(name + "\n" + PARENT + "\n" + name + "\n" + PosX + "\n" + PosY + "\n" + PosZ + "\n" + SizeX + "\n" + SizeY + "\n" + SizeZ + "\n" + U + "\n" + V); - } - } - return sb.ToString(); - } - private void renderer3D1_TextureChanging(object sender, Rendering.TextureChangingEventArgs e) { var img = e.NewTexture; @@ -344,37 +317,4 @@ namespace PckStudio.Forms.Editor deleteToolStripMenuItem_Click(sender, e); } } - - class CSMJObject - { - [JsonProperty("credit")] - public string Credit { get; set; } - - [JsonProperty("texture_size")] - public int[] TextureSize; - - [JsonProperty("elements")] - public CSMJObjectElement[] Elements; - - [JsonProperty("groups")] - public CSMJObjectGroup[] Groups; - } - - class CSMJObjectElement - { - [JsonProperty("name")] - public string Name { get; set; } - - public float[] from; - public float[] to; - } - - class CSMJObjectGroup - { - [JsonProperty("name")] - public string Name { get; set; } - - public float[] origin; - public int[] children; - } } \ No newline at end of file