Rename 'modelTextureLocations' to 'modelMetaData'

This commit is contained in:
miku-666
2024-08-09 23:35:31 +02:00
parent 0b3a2211e3
commit cb7c5ab7cb
6 changed files with 43 additions and 28 deletions

View File

@@ -19,7 +19,7 @@ namespace PckStudio.Internal
{
public static GameModelImporter Default { get; } = new GameModelImporter();
internal static ReadOnlyDictionary<string, JsonModelMetaData> ModelTextureLocations { get; } = JsonConvert.DeserializeObject<ReadOnlyDictionary<string, JsonModelMetaData>>(Resources.modelTextureLocations);
internal static ReadOnlyDictionary<string, JsonModelMetaData> ModelTextureLocations { get; } = JsonConvert.DeserializeObject<ReadOnlyDictionary<string, JsonModelMetaData>>(Resources.modelMetaData);
private GameModelImporter()
{

View File

@@ -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);

View File

@@ -633,7 +633,7 @@
<None Include="Resources\atlases\moonPhaseData.json" />
<None Include="Resources\atlases\paintingData.json" />
<None Include="Resources\atlases\particleData.json" />
<None Include="Resources\model\modelTextureLocations.json" />
<None Include="Resources\model\modelMetaData.json" />
<None Include="Resources\shader\framebufferFragmentShader.glsl" />
<None Include="Resources\shader\framebufferVertexShader.glsl" />
<None Include="Resources\shader\plainColorFragmentShader.glsl" />

View File

@@ -814,6 +814,43 @@ namespace PckStudio.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to // TODO: Add parent detection
///
///{
/// &quot;bat&quot;: {
/// &quot;textureLocations&quot;: [
/// &quot;res/mob/bat&quot;
/// ],
/// &quot;parents&quot;: {
/// &quot;rightEar&quot;: &quot;head&quot;,
/// &quot;leftEar&quot;: &quot;head&quot;
/// }
/// },
/// &quot;bed&quot;: {
/// &quot;textureLocations&quot;: [
/// &quot;res/item/bed&quot;
/// ]
/// },
/// &quot;blaze&quot;: {
/// &quot;textureLocations&quot;: [
/// &quot;res/mob/fire&quot;
/// ]
///
/// },
/// &quot;boat&quot;: {
/// &quot;textureLocations&quot;: [
/// &quot;res/item/boat/boat_acacia&quot;,
/// &quot;res/item/boat/boat_birch&quot;,
/// &quot;res/item/boat/boat_darkoak&quot;,
/// &quot;res/item/boat/boat [rest of string was truncated]&quot;;.
/// </summary>
public static string modelMetaData {
get {
return ResourceManager.GetString("modelMetaData", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -824,26 +861,6 @@ namespace PckStudio.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to {
/// &quot;bat&quot;: [ &quot;res/mob/bat&quot; ],
/// &quot;bed&quot;: [ &quot;res/item/bed&quot; ],
/// &quot;blaze&quot;: [ &quot;res/mob/fire&quot; ],
/// &quot;boat&quot;: [ &quot;res/item/boat/boat_acacia&quot;, &quot;res/item/boat/boat_birch&quot;, &quot;res/item/boat/boat_darkoak&quot;, &quot;res/item/boat/boat_jungle&quot;, &quot;res/item/boat/boat_oak&quot;, &quot;res/item/boat/boat_spruce&quot; ],
/// &quot;chicken&quot;: [ &quot;res/mob/chicken&quot; ],
/// &quot;cow&quot;: [ &quot;res/mob/cow&quot; ],
/// &quot;creeper&quot;: [ &quot;res/mob/creeper&quot; ],
/// &quot;creeper_head&quot;: [ &quot;res/mob/creeper&quot; ],
/// &quot;dolphin&quot;: [ &quot;res/mob/dolphin&quot; ],
/// &quot;dragon&quot;: [ &quot;res/mob/enderdragon/ender&quot; ],
/// &quot;d [rest of string was truncated]&quot;;.
/// </summary>
public static string modelTextureLocations {
get {
return ResourceManager.GetString("modelTextureLocations", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -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);
///};.
/// </summary>
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);
///};.
/// </summary>
public static string skinVertexShader {

View File

@@ -421,7 +421,7 @@
<data name="file_restore" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons\file_restore.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="modelTextureLocations" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\model\modelTextureLocations.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
<data name="modelMetaData" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\model\modelMetaData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
</root>