From cb7c5ab7cbf18bfee7d249a9f2fe2074e5287844 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Fri, 9 Aug 2024 23:35:31 +0200 Subject: [PATCH] Rename 'modelTextureLocations' to 'modelMetaData' --- PCK-Studio/Internal/GameModelImporter.cs | 2 +- PCK-Studio/Internal/SkinModelImporter.cs | 1 - PCK-Studio/PckStudio.csproj | 2 +- PCK-Studio/Properties/Resources.Designer.cs | 62 ++++++++++++------- PCK-Studio/Properties/Resources.resx | 4 +- ...xtureLocations.json => modelMetaData.json} | 0 6 files changed, 43 insertions(+), 28 deletions(-) rename PCK-Studio/Resources/model/{modelTextureLocations.json => modelMetaData.json} (100%) diff --git a/PCK-Studio/Internal/GameModelImporter.cs b/PCK-Studio/Internal/GameModelImporter.cs index 14dc1a2b..8db9b6f9 100644 --- a/PCK-Studio/Internal/GameModelImporter.cs +++ b/PCK-Studio/Internal/GameModelImporter.cs @@ -19,7 +19,7 @@ namespace PckStudio.Internal { public static GameModelImporter Default { get; } = new GameModelImporter(); - internal static ReadOnlyDictionary ModelTextureLocations { get; } = JsonConvert.DeserializeObject>(Resources.modelTextureLocations); + internal static ReadOnlyDictionary ModelTextureLocations { get; } = JsonConvert.DeserializeObject>(Resources.modelMetaData); private GameModelImporter() { diff --git a/PCK-Studio/Internal/SkinModelImporter.cs b/PCK-Studio/Internal/SkinModelImporter.cs index 9255901b..b7d74043 100644 --- a/PCK-Studio/Internal/SkinModelImporter.cs +++ b/PCK-Studio/Internal/SkinModelImporter.cs @@ -41,7 +41,6 @@ namespace PckStudio.Internal private SkinModelImporter() { - InternalAddProvider(new("Pck skin model(*.psm)", "*.psm"), ImportPsm, ExportPsm); InternalAddProvider(new("Block bench model(*.bbmodel)", "*.bbmodel"), ImportBlockBenchModel, ExportBlockBenchModel); InternalAddProvider(new("Bedrock (Legacy) Model(*.geo.json;*.json)", "*.geo.json;*.json"), ImportBedrockJson, ExportBedrockJson); diff --git a/PCK-Studio/PckStudio.csproj b/PCK-Studio/PckStudio.csproj index ff2f84d8..4ec13133 100644 --- a/PCK-Studio/PckStudio.csproj +++ b/PCK-Studio/PckStudio.csproj @@ -633,7 +633,7 @@ - + diff --git a/PCK-Studio/Properties/Resources.Designer.cs b/PCK-Studio/Properties/Resources.Designer.cs index d96b6785..cefd3304 100644 --- a/PCK-Studio/Properties/Resources.Designer.cs +++ b/PCK-Studio/Properties/Resources.Designer.cs @@ -814,6 +814,43 @@ namespace PckStudio.Properties { } } + /// + /// Looks up a localized string similar to // TODO: Add parent detection + /// + ///{ + /// "bat": { + /// "textureLocations": [ + /// "res/mob/bat" + /// ], + /// "parents": { + /// "rightEar": "head", + /// "leftEar": "head" + /// } + /// }, + /// "bed": { + /// "textureLocations": [ + /// "res/item/bed" + /// ] + /// }, + /// "blaze": { + /// "textureLocations": [ + /// "res/mob/fire" + /// ] + /// + /// }, + /// "boat": { + /// "textureLocations": [ + /// "res/item/boat/boat_acacia", + /// "res/item/boat/boat_birch", + /// "res/item/boat/boat_darkoak", + /// "res/item/boat/boat [rest of string was truncated]";. + /// + public static string modelMetaData { + get { + return ResourceManager.GetString("modelMetaData", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -824,26 +861,6 @@ namespace PckStudio.Properties { } } - /// - /// Looks up a localized string similar to { - /// "bat": [ "res/mob/bat" ], - /// "bed": [ "res/item/bed" ], - /// "blaze": [ "res/mob/fire" ], - /// "boat": [ "res/item/boat/boat_acacia", "res/item/boat/boat_birch", "res/item/boat/boat_darkoak", "res/item/boat/boat_jungle", "res/item/boat/boat_oak", "res/item/boat/boat_spruce" ], - /// "chicken": [ "res/mob/chicken" ], - /// "cow": [ "res/mob/cow" ], - /// "creeper": [ "res/mob/creeper" ], - /// "creeper_head": [ "res/mob/creeper" ], - /// "dolphin": [ "res/mob/dolphin" ], - /// "dragon": [ "res/mob/enderdragon/ender" ], - /// "d [rest of string was truncated]";. - /// - public static string modelTextureLocations { - get { - return ResourceManager.GetString("modelTextureLocations", resourceCulture); - } - } - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -1085,7 +1102,7 @@ namespace PckStudio.Properties { ///void main() ///{ /// color = a_Color; - /// gl_Position = ViewProjection * Transform * vec4(a_Pos.x, a_Pos.yz * -1.0, 1.0); + /// gl_Position = ViewProjection * Transform * vec4(a_Pos.xyz, 1.0); ///};. /// public static string plainColorVertexShader { @@ -1226,8 +1243,7 @@ namespace PckStudio.Properties { ///void main() ///{ /// dataOut.TexCoord = texCoord; - /// vec4 invertedVertex = vec4(vertexPosition.x, vertexPosition.yz * -1.0, 1.0); - /// gl_Position = u_ViewProjection * u_Transform * invertedVertex; + /// gl_Position = u_ViewProjection * u_Transform * vec4(vertexPosition, 1.0); ///};. /// public static string skinVertexShader { diff --git a/PCK-Studio/Properties/Resources.resx b/PCK-Studio/Properties/Resources.resx index f4da87e9..524e4da9 100644 --- a/PCK-Studio/Properties/Resources.resx +++ b/PCK-Studio/Properties/Resources.resx @@ -421,7 +421,7 @@ ..\Resources\icons\file_restore.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\model\modelTextureLocations.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + ..\Resources\model\modelMetaData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 \ No newline at end of file diff --git a/PCK-Studio/Resources/model/modelTextureLocations.json b/PCK-Studio/Resources/model/modelMetaData.json similarity index 100% rename from PCK-Studio/Resources/model/modelTextureLocations.json rename to PCK-Studio/Resources/model/modelMetaData.json