mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-10 01:13:48 +00:00
ModelImporter - Add block bench export for models inside models.bin
This commit is contained in:
100
PCK-Studio/External/Format/BlockBenchModel.cs
vendored
100
PCK-Studio/External/Format/BlockBenchModel.cs
vendored
@@ -2,6 +2,7 @@
|
||||
using System.Buffers.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
@@ -11,6 +12,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PckStudio.Internal;
|
||||
|
||||
namespace PckStudio.External.Format
|
||||
{
|
||||
@@ -49,7 +51,7 @@ namespace PckStudio.External.Format
|
||||
[JsonProperty("inflate")]
|
||||
internal float Inflate;
|
||||
|
||||
[JsonProperty("origin")]
|
||||
[JsonProperty("origin", NullValueHandling = NullValueHandling.Ignore)]
|
||||
private float[] origin;
|
||||
|
||||
[JsonProperty("from")]
|
||||
@@ -61,6 +63,9 @@ namespace PckStudio.External.Format
|
||||
[JsonProperty("uv_offset")]
|
||||
private int[] uv_offset;
|
||||
|
||||
[JsonProperty("rotation", NullValueHandling = NullValueHandling.Ignore)]
|
||||
private float[] rotation;
|
||||
|
||||
[JsonIgnore()]
|
||||
internal Vector3 Origin
|
||||
{
|
||||
@@ -128,6 +133,23 @@ namespace PckStudio.External.Format
|
||||
}
|
||||
}
|
||||
|
||||
[JsonIgnore()]
|
||||
internal Vector3 Rotation
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Vector3(rotation?[0] ?? 0, rotation?[1] ?? 0, rotation?[2] ?? 0);
|
||||
}
|
||||
set
|
||||
{
|
||||
if (rotation is null || rotation.Length < 3)
|
||||
rotation = new float[3];
|
||||
rotation[0] = value.X;
|
||||
rotation[1] = value.Y;
|
||||
rotation[2] = value.Z;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonProperty("type")]
|
||||
internal string Type;
|
||||
|
||||
@@ -137,38 +159,52 @@ namespace PckStudio.External.Format
|
||||
|
||||
internal class Texture
|
||||
{
|
||||
public static implicit operator Texture(Image image) => new Texture(image);
|
||||
public static implicit operator Image(Texture texture) => texture.GetImage();
|
||||
public static implicit operator Texture(Image image) => new Texture(image);
|
||||
public static implicit operator Texture(NamedTexture namedTexture) => new Texture(namedTexture.Name, namedTexture.Texture);
|
||||
|
||||
private Texture() { }
|
||||
private const string _TEXTUREDATAHEAD = "data:image/png;base64,";
|
||||
|
||||
internal Texture(string name, Image image)
|
||||
: this(image)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
internal Texture(Image image)
|
||||
{
|
||||
var ms = new MemoryStream();
|
||||
image.Save(ms, ImageFormat.Png);
|
||||
TextureSource = "data:image/png;base64," + Convert.ToBase64String(ms.ToArray());
|
||||
if (image is not null)
|
||||
{
|
||||
SetImage(image);
|
||||
return;
|
||||
}
|
||||
Debug.WriteLine($"param: {nameof(image)} is null");
|
||||
}
|
||||
|
||||
[JsonProperty("name")]
|
||||
internal string Name;
|
||||
internal string Name { get; }
|
||||
|
||||
[JsonProperty("source")]
|
||||
internal string TextureSource;
|
||||
internal string TextureSource { get; private set; }
|
||||
|
||||
private Image GetImage()
|
||||
{
|
||||
string data = TextureSource;
|
||||
const string dataHead = "data:image/png;base64,";
|
||||
if (data.StartsWith(dataHead))
|
||||
if (data.StartsWith(_TEXTUREDATAHEAD))
|
||||
{
|
||||
byte[] encodedData = Convert.FromBase64String(data.Substring(dataHead.Length));
|
||||
using (var ms = new MemoryStream(encodedData))
|
||||
{
|
||||
return Image.FromStream(ms);
|
||||
}
|
||||
byte[] encodedData = Convert.FromBase64String(data.Substring(_TEXTUREDATAHEAD.Length));
|
||||
using var ms = new MemoryStream(encodedData);
|
||||
return Image.FromStream(ms);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void SetImage(Image image)
|
||||
{
|
||||
var ms = new MemoryStream();
|
||||
image.Save(ms, ImageFormat.Png);
|
||||
TextureSource = _TEXTUREDATAHEAD + Convert.ToBase64String(ms.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
internal class Outline
|
||||
@@ -193,6 +229,40 @@ namespace PckStudio.External.Format
|
||||
}
|
||||
}
|
||||
|
||||
[JsonProperty("rotation")]
|
||||
private float[] rotation;
|
||||
|
||||
[JsonIgnore]
|
||||
public Vector3 Rotation
|
||||
{
|
||||
get => new Vector3(rotation?[0] ?? 0, rotation?[1] ?? 0, rotation?[2] ?? 0);
|
||||
set
|
||||
{
|
||||
if (rotation is null || rotation.Length < 3)
|
||||
rotation = new float[3];
|
||||
rotation[0] = value.X;
|
||||
rotation[1] = value.Y;
|
||||
rotation[2] = value.Z;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonProperty("pivot")]
|
||||
private float[] pivot;
|
||||
|
||||
[JsonIgnore]
|
||||
public Vector3 Pivot
|
||||
{
|
||||
get => new Vector3(pivot?[0] ?? 0, pivot?[1] ?? 0, pivot?[2] ?? 0);
|
||||
set
|
||||
{
|
||||
if (pivot is null || pivot.Length < 3)
|
||||
pivot = new float[3];
|
||||
pivot[0] = value.X;
|
||||
pivot[1] = value.Y;
|
||||
pivot[2] = value.Z;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonProperty("uuid")]
|
||||
internal Guid Uuid;
|
||||
|
||||
|
||||
19
PCK-Studio/Internal/Json/JsonModelMetaData.cs
Normal file
19
PCK-Studio/Internal/Json/JsonModelMetaData.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.Internal.Json
|
||||
{
|
||||
internal class JsonModelMetaData
|
||||
{
|
||||
[JsonProperty("textureLocations", Required = Required.Always)]
|
||||
public string[] TextureLocations { get; set; }
|
||||
|
||||
//[JsonProperty("parents", NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||
//public Dictionary<string, string> ParentBones { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,6 @@ using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
using PckStudio.Rendering;
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.External.Format;
|
||||
using PckStudio.Internal.IO.PSM;
|
||||
@@ -34,6 +33,10 @@ using PckStudio.Internal.FileFormats;
|
||||
using PckStudio.Forms.Additional_Popups;
|
||||
using System.Drawing;
|
||||
using PckStudio.Internal.Skin;
|
||||
using OMI.Formats.Model;
|
||||
using PckStudio.Internal.Json;
|
||||
using System.Collections.ObjectModel;
|
||||
using PckStudio.Properties;
|
||||
|
||||
namespace PckStudio.Internal
|
||||
{
|
||||
@@ -48,6 +51,13 @@ namespace PckStudio.Internal
|
||||
|
||||
internal static string SupportedModelFileFormatsFilter { get; } = string.Join("|", SupportedModelFormts);
|
||||
|
||||
internal static ReadOnlyDictionary<string, JsonModelMetaData> ModelTextureLocations { get; private set; }
|
||||
|
||||
static ModelImporter()
|
||||
{
|
||||
ModelTextureLocations = JsonConvert.DeserializeObject<ReadOnlyDictionary<string, JsonModelMetaData>>(Resources.modelTextureLocations);
|
||||
}
|
||||
|
||||
internal static SkinModelInfo Import(string fileName)
|
||||
{
|
||||
string fileExtension = Path.GetExtension(fileName);
|
||||
@@ -185,7 +195,7 @@ namespace PckStudio.Internal
|
||||
if (!element.UseBoxUv || !element.IsVisibile)
|
||||
return;
|
||||
|
||||
BoundingBox boundingBox = new BoundingBox(element.From, element.To);
|
||||
var boundingBox = new Rendering.BoundingBox(element.From, element.To);
|
||||
Vector3 pos = boundingBox.Start;
|
||||
Vector3 size = boundingBox.Volume;
|
||||
Vector2 uv = element.UvOffset;
|
||||
@@ -202,19 +212,7 @@ namespace PckStudio.Internal
|
||||
internal static void ExportBlockBenchModel(string fileName, SkinModelInfo modelInfo)
|
||||
{
|
||||
Image exportTexture = FixTexture(modelInfo);
|
||||
BlockBenchModel blockBenchModel = new BlockBenchModel()
|
||||
{
|
||||
Name = Path.GetFileNameWithoutExtension(fileName),
|
||||
Textures = [exportTexture],
|
||||
TextureResolution = new TextureRes(64, exportTexture.Width == exportTexture.Height ? 64 : 32),
|
||||
ModelIdentifier = "",
|
||||
Metadata = new Meta()
|
||||
{
|
||||
FormatVersion = "4.5",
|
||||
ModelFormat = "free",
|
||||
UseBoxUv = true,
|
||||
}
|
||||
};
|
||||
BlockBenchModel blockBenchModel = CreateBlockBenchModel(Path.GetFileNameWithoutExtension(fileName), new Size(64, exportTexture.Width == exportTexture.Height ? 64 : 32), [exportTexture]);
|
||||
|
||||
Dictionary<string, Outline> outliners = new Dictionary<string, Outline>(5);
|
||||
List<Element> elements = new List<Element>(modelInfo.AdditionalBoxes.Count);
|
||||
@@ -254,26 +252,97 @@ namespace PckStudio.Internal
|
||||
File.WriteAllText(fileName, content);
|
||||
}
|
||||
|
||||
internal static void ExportBlockBenchModel(string fileName, Model model, IEnumerable<NamedTexture> textures)
|
||||
{
|
||||
BlockBenchModel blockBenchModel = CreateBlockBenchModel(Path.GetFileNameWithoutExtension(fileName), model.TextureSize, textures.Select(nt => (Texture)nt));
|
||||
|
||||
List<Outline> outliners = new List<Outline>(5);
|
||||
List<Element> elements = new List<Element>(model.Parts.Count);
|
||||
|
||||
Vector3 transformAxis = new Vector3(1, 1, 0);
|
||||
|
||||
foreach (ModelPart part in model.Parts.Values)
|
||||
{
|
||||
var outline = new Outline(part.Name);
|
||||
|
||||
Vector3 partTranslation = new Vector3(part.TranslationX, part.TranslationY, part.TranslationZ);
|
||||
outline.Origin = TranslateToInternalPosition("", partTranslation, Vector3.Zero, transformAxis);
|
||||
|
||||
Vector3 rotation = new Vector3(part.UnknownFloat, part.TextureOffsetX, part.TextureOffsetY) + new Vector3(part.RotationX, part.RotationY, part.RotationZ);
|
||||
outline.Rotation = rotation * TransformSpace(Vector3.One, Vector3.Zero, transformAxis);
|
||||
|
||||
foreach (ModelBox box in part.Boxes)
|
||||
{
|
||||
Element element = CreateElement(box, partTranslation, part.Name);
|
||||
element.Origin = outline.Origin;
|
||||
elements.Add(element);
|
||||
outline.Children.Add(element.Uuid);
|
||||
}
|
||||
outliners.Add(outline);
|
||||
}
|
||||
|
||||
blockBenchModel.Elements = elements.ToArray();
|
||||
blockBenchModel.Outliner = JArray.FromObject(outliners);
|
||||
|
||||
string content = JsonConvert.SerializeObject(blockBenchModel);
|
||||
File.WriteAllText(fileName, content);
|
||||
}
|
||||
|
||||
private static BlockBenchModel CreateBlockBenchModel(string name, Size textureResolution, IEnumerable<Texture> textures)
|
||||
{
|
||||
return new BlockBenchModel()
|
||||
{
|
||||
Name = name,
|
||||
Textures = textures.ToArray(),
|
||||
TextureResolution = textureResolution,
|
||||
ModelIdentifier = "",
|
||||
Metadata = new Meta()
|
||||
{
|
||||
FormatVersion = "4.5",
|
||||
ModelFormat = "free",
|
||||
UseBoxUv = true,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static Element CreateElement(SkinBOX box)
|
||||
{
|
||||
Element element = new Element
|
||||
Vector3 transformPos = TranslateFromInternalPosistion(box, new Vector3(1, 1, 0));
|
||||
Element element = CreateElement(box.UV, transformPos, box.Size, box.Scale, box.Mirror);
|
||||
if (box.IsOverlayPart())
|
||||
element.Inflate = box.Type == "HEADWEAR" ? 0.5f : 0.25f;
|
||||
return element;
|
||||
}
|
||||
|
||||
private static Element CreateElement(ModelBox box, Vector3 origin, string name)
|
||||
{
|
||||
Name = "cube",
|
||||
Vector3 pos = new Vector3(box.PositionX, box.PositionY, box.PositionZ);
|
||||
Vector3 size = new Vector3(box.Length, box.Height, box.Width);
|
||||
Vector3 transformPos = TranslateToInternalPosition("", pos + origin, size, new Vector3(1, 1, 0));
|
||||
return CreateElement(name, new Vector2(box.UvX, box.UvY), transformPos, size, box.Scale, box.Mirror);
|
||||
}
|
||||
|
||||
private static Element CreateElement(Vector2 uvOffset, Vector3 pos, Vector3 size, float inflate, bool mirror)
|
||||
{
|
||||
return CreateElement("cube", uvOffset, pos, size, inflate, mirror);
|
||||
}
|
||||
|
||||
private static Element CreateElement(string name, Vector2 uvOffset, Vector3 pos, Vector3 size, float inflate, bool mirror)
|
||||
{
|
||||
return new Element
|
||||
{
|
||||
Name = name,
|
||||
UseBoxUv = true,
|
||||
Locked = false,
|
||||
Rescale = false,
|
||||
Type = "cube",
|
||||
Uuid = Guid.NewGuid(),
|
||||
UvOffset = box.UV,
|
||||
MirrorUv = box.Mirror
|
||||
UvOffset = uvOffset,
|
||||
MirrorUv = mirror,
|
||||
Inflate = inflate,
|
||||
From = pos,
|
||||
To = pos + size
|
||||
};
|
||||
Vector3 transformPos = TranslateFromInternalPosistion(box, new Vector3(1, 1, 0));
|
||||
|
||||
element.From = transformPos;
|
||||
element.To = transformPos + box.Size;
|
||||
if (box.IsOverlayPart())
|
||||
element.Inflate = box.Type == "HEADWEAR" ? 0.5f : 0.25f;
|
||||
return element;
|
||||
}
|
||||
|
||||
internal static SkinModelInfo ImportBedrockJson(string fileName)
|
||||
|
||||
17
PCK-Studio/Internal/NamedTexture.cs
Normal file
17
PCK-Studio/Internal/NamedTexture.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
namespace PckStudio.Internal
|
||||
{
|
||||
internal readonly struct NamedTexture
|
||||
{
|
||||
public readonly string Name;
|
||||
public readonly Image Texture;
|
||||
|
||||
public NamedTexture(string name, Image texture)
|
||||
{
|
||||
Name = name;
|
||||
Texture = texture;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,7 +109,7 @@ namespace PckStudio
|
||||
[PckAssetType.ColourTableFile] = HandleColourFile,
|
||||
[PckAssetType.GameRulesHeader] = HandleGameRuleFile,
|
||||
[PckAssetType.SkinDataFile] = null, // HandleInnerPckFile,
|
||||
[PckAssetType.ModelsFile] = null, //HandleModelsFile, // Note: Uncomment when implemented
|
||||
[PckAssetType.ModelsFile] = HandleModelsFile, // Note: Uncomment when implemented
|
||||
[PckAssetType.BehavioursFile] = HandleBehavioursFile,
|
||||
[PckAssetType.MaterialFile] = HandleMaterialFile,
|
||||
};
|
||||
@@ -598,7 +598,59 @@ namespace PckStudio
|
||||
|
||||
public void HandleModelsFile(PckAsset file)
|
||||
{
|
||||
MessageBox.Show(this, "Models.bin support has not been implemented. You can use the Spark Editor for the time being to edit these files.", "Not implemented yet.");
|
||||
ModelContainer modelContainer = file.GetData(new ModelFileReader());
|
||||
if (modelContainer.Models.Count == 0)
|
||||
{
|
||||
MessageBox.Show("No models found.", "Empty Model file", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
#if false
|
||||
Dictionary<string, JsonModelMetaData> modelMetaData = new();
|
||||
foreach (Model model in modelContainer.Models.Values)
|
||||
{
|
||||
bool hasMetaData = ModelImporter.ModelTextureLocations.ContainsKey(model.Name);
|
||||
if (!hasMetaData)
|
||||
{
|
||||
Debug.WriteLine("No meta data found for: " + model.Name);
|
||||
modelMetaData.Add(model.Name, new JsonModelMetaData() { TextureLocations = new string[1] });
|
||||
}
|
||||
}
|
||||
Debug.WriteLineIf(modelMetaData.Count > 0, JsonConvert.SerializeObject(modelMetaData, Formatting.Indented));
|
||||
#endif
|
||||
|
||||
using ItemSelectionPopUp itemSelection = new ItemSelectionPopUp(modelContainer.Models.Keys.ToArray());
|
||||
if (itemSelection.ShowDialog() == DialogResult.OK && modelContainer.Models.ContainsKey(itemSelection.SelectedItem))
|
||||
{
|
||||
Model model = modelContainer.Models[itemSelection.SelectedItem];
|
||||
Debug.WriteLine(model.Name + "; ");
|
||||
Debug.WriteLine(model.TextureSize + "; ");
|
||||
|
||||
using SaveFileDialog openFileDialog = new SaveFileDialog();
|
||||
openFileDialog.FileName = model.Name;
|
||||
openFileDialog.Filter = "Block bench model(*.bbmodel)|*.bbmodel";
|
||||
|
||||
IEnumerable<NamedTexture> GetModelTextures(string modelName)
|
||||
{
|
||||
if (!ModelImporter.ModelTextureLocations.ContainsKey(modelName) || ModelImporter.ModelTextureLocations[modelName]?.TextureLocations?.Length <= 0)
|
||||
return Array.Empty<NamedTexture>();
|
||||
|
||||
return ModelImporter.ModelTextureLocations[modelName].TextureLocations.Select(texturePath =>
|
||||
{
|
||||
if (currentPCK.TryGetAsset(texturePath + ".png", PckAssetType.TextureFile, out PckAsset modelTextureAsset) ||
|
||||
currentPCK.TryGetAsset(texturePath + ".tga", PckAssetType.TextureFile, out modelTextureAsset))
|
||||
return new NamedTexture(Path.GetFileName(texturePath), modelTextureAsset.GetTexture());
|
||||
return default!;
|
||||
});
|
||||
}
|
||||
|
||||
IEnumerable<NamedTexture> textures = GetModelTextures(model.Name);
|
||||
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
ModelImporter.ExportBlockBenchModel(openFileDialog.FileName, model, textures);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleBehavioursFile(PckAsset asset)
|
||||
|
||||
@@ -169,6 +169,8 @@
|
||||
<Compile Include="Internal\Misc\RichPresenceClient.cs" />
|
||||
<Compile Include="Internal\ModelImporter.cs" />
|
||||
<Compile Include="Internal\ModelPartSpecifics.cs" />
|
||||
<Compile Include="Internal\Json\JsonModelMetaData.cs" />
|
||||
<Compile Include="Internal\NamedTexture.cs" />
|
||||
<Compile Include="Internal\Serializer\AnimationSerializer.cs" />
|
||||
<Compile Include="Internal\Deserializer\AnimationDeserializer.cs" />
|
||||
<Compile Include="Interfaces\IPckAssetDeserializer.cs" />
|
||||
@@ -627,6 +629,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\shader\framebufferFragmentShader.glsl" />
|
||||
<None Include="Resources\shader\framebufferVertexShader.glsl" />
|
||||
<None Include="Resources\shader\plainColorFragmentShader.glsl" />
|
||||
|
||||
30
PCK-Studio/Properties/Resources.Designer.cs
generated
30
PCK-Studio/Properties/Resources.Designer.cs
generated
@@ -245,9 +245,8 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 7.0 (IN DEVELOPMENT)
|
||||
/// Looks up a localized string similar to 7.0.0.0
|
||||
///====================
|
||||
///Some features may be completely missing or incomplete at this point in time!
|
||||
///
|
||||
///-Added .3dst (3DS Texture) support
|
||||
///-Semi-added Sub-Pck editing
|
||||
@@ -258,7 +257,8 @@ namespace PckStudio.Properties {
|
||||
///-Massive codebase overhaul and optimization lead by miku-666 (aka NessieHax)!!!
|
||||
///-Some UI redesigned by yaboiFoxx
|
||||
///-Improved the changelog!
|
||||
///-New icons for each o [rest of string was truncated]";.
|
||||
///-New icons for each of the file types, with unique image icons for skin, texture, and cape files
|
||||
///-Added the abili [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string CHANGELOG {
|
||||
get {
|
||||
@@ -727,9 +727,9 @@ namespace PckStudio.Properties {
|
||||
/// {
|
||||
/// "internalName": "helmetCloth",
|
||||
/// "displayName": "Leather Cap",
|
||||
/// "allowCustomColour": true,
|
||||
/// "hasColourEntry": true,
|
||||
/// "colourEntry": {
|
||||
/// "hasCustomColour": true,
|
||||
/// "defaultName": "Armour_Default_Leather_Colour",
|
||||
/// "variants": [ "Armour_Default_Leather_Colour" ]
|
||||
/// }
|
||||
@@ -739,7 +739,7 @@ namespace PckStudio.Properties {
|
||||
/// "displayName": "Chain Helmet"
|
||||
/// },
|
||||
/// {
|
||||
/// "internalName": " [rest of string was truncated]";.
|
||||
/// "internalName": [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string itemData {
|
||||
get {
|
||||
@@ -824,6 +824,26 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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]";.
|
||||
/// </summary>
|
||||
public static string modelTextureLocations {
|
||||
get {
|
||||
return ResourceManager.GetString("modelTextureLocations", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
||||
@@ -379,69 +379,6 @@
|
||||
<data name="Replace" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\Replace.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="file_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\file_export.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="file_import" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\file_import.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ranch" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\ranch.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ProjectLogo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\..\ProjectLogo.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="moon_phases_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\moon_phases.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="additional_map_icons_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\additional_mapicons.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="map_icons_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\map_icons.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="experience_orbs_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\experience_orbs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="blockData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\blockData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="experienceOrbData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\experienceOrbData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="explosionData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\explosionData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="explosions_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\explosion.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="itemData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\itemData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="mapIconData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\mapIconData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="moonPhaseData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\moonPhaseData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="particleData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\particleData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="particles_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\particles.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="bannerData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\bannerData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="banners_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\banners.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="paintingData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\paintingData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="paintings_atlas" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\paintings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="skinVertexShader" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\shader\skinVertexShader.glsl;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
@@ -475,12 +412,6 @@
|
||||
<data name="armor" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\armor.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="trello" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\external\trello.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="entityBehavioursData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\atlases\entityBehavioursData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="slim_template" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\anim_editor\slim_template.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -490,4 +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>
|
||||
</root>
|
||||
404
PCK-Studio/Resources/model/modelTextureLocations.json
Normal file
404
PCK-Studio/Resources/model/modelTextureLocations.json
Normal file
@@ -0,0 +1,404 @@
|
||||
{
|
||||
"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_jungle",
|
||||
"res/item/boat/boat_oak",
|
||||
"res/item/boat/boat_spruce"
|
||||
]
|
||||
},
|
||||
"chicken": {
|
||||
"textureLocations": [
|
||||
"res/mob/chicken"
|
||||
],
|
||||
"parents": {
|
||||
"comb": "head",
|
||||
"beak": "head"
|
||||
}
|
||||
},
|
||||
"cow": {
|
||||
"textureLocations": [
|
||||
"res/mob/cow"
|
||||
]
|
||||
},
|
||||
"creeper": {
|
||||
"textureLocations": [
|
||||
"res/mob/creeper"
|
||||
]
|
||||
},
|
||||
"creeper_head": {
|
||||
"textureLocations": [
|
||||
"res/mob/creeper"
|
||||
]
|
||||
},
|
||||
"dolphin": {
|
||||
"textureLocations": [
|
||||
"res/mob/dolphin"
|
||||
]
|
||||
},
|
||||
"dragon": {
|
||||
"textureLocations": [
|
||||
"res/mob/enderdragon/ender"
|
||||
]
|
||||
},
|
||||
"dragon_head": {
|
||||
"textureLocations": [
|
||||
"res/mob/enderdragon/ender"
|
||||
]
|
||||
},
|
||||
"enderman": {
|
||||
"textureLocations": [
|
||||
"res/mob/enderman"
|
||||
]
|
||||
},
|
||||
"evoker": {
|
||||
"textureLocations": [
|
||||
"res/mob/illager/evoker"
|
||||
]
|
||||
},
|
||||
"ghast": {
|
||||
"textureLocations": [
|
||||
"res/mob/ghast",
|
||||
"res/mob/ghast_fire"
|
||||
]
|
||||
},
|
||||
"guardian": {
|
||||
"textureLocations": [
|
||||
"res/mob/guardian",
|
||||
"res/mob/guardian_elder"
|
||||
]
|
||||
},
|
||||
"irongolem": {
|
||||
"textureLocations": [
|
||||
"res/mob/villager_golem"
|
||||
]
|
||||
},
|
||||
"lavaslime": {
|
||||
"textureLocations": [
|
||||
"res/mob/lava"
|
||||
]
|
||||
},
|
||||
"llama": {
|
||||
"textureLocations": [
|
||||
"res/mob/llama/llama",
|
||||
"res/mob/llama/llama_brown",
|
||||
"res/mob/llama/llama_creamy",
|
||||
"res/mob/llama/llama_gray",
|
||||
"res/mob/llama/llama_white"
|
||||
]
|
||||
},
|
||||
"minecart": {
|
||||
"textureLocations": [
|
||||
"res/item/cart"
|
||||
]
|
||||
},
|
||||
"ocelot": {
|
||||
"textureLocations": [
|
||||
"res/mob/ozelot"
|
||||
]
|
||||
},
|
||||
"parrot": {
|
||||
"textureLocations": [
|
||||
"res/mob/parrot/parrot_blue",
|
||||
"res/mob/parrot/parrot_green",
|
||||
"res/mob/parrot/parrot_grey",
|
||||
"res/mob/parrot/parrot_red_blue",
|
||||
"res/mob/parrot/parrot_yellow_blue"
|
||||
]
|
||||
},
|
||||
"phantom": {
|
||||
"textureLocations": [
|
||||
"res/mob/phantom"
|
||||
]
|
||||
},
|
||||
"pig": {
|
||||
"textureLocations": [
|
||||
"res/mob/pig",
|
||||
"res/mob/saddle"
|
||||
]
|
||||
},
|
||||
"pigzombie": {
|
||||
"textureLocations": [
|
||||
"res/mob/pigzombie"
|
||||
]
|
||||
},
|
||||
"polarbear": {
|
||||
"textureLocations": [
|
||||
"res/mob/bear/polarbear"
|
||||
]
|
||||
},
|
||||
"rabbit": {
|
||||
"textureLocations": [
|
||||
"res/mob/rabbit/black",
|
||||
"res/mob/rabbit/brown",
|
||||
"res/mob/rabbit/caerbannog",
|
||||
"res/mob/rabbit/gold",
|
||||
"res/mob/rabbit/salt",
|
||||
"res/mob/rabbit/toast",
|
||||
"res/mob/rabbit/white",
|
||||
"res/mob/rabbit/white_splotched"
|
||||
]
|
||||
},
|
||||
"sheep": {
|
||||
"textureLocations": [
|
||||
"res/mob/sheep"
|
||||
]
|
||||
},
|
||||
"sheep.sheared": {
|
||||
"textureLocations": [
|
||||
""
|
||||
]
|
||||
},
|
||||
"shulker": {
|
||||
"textureLocations": [
|
||||
"res/mob/shulker/endergolem",
|
||||
"res/mob/shulker/spark"
|
||||
]
|
||||
},
|
||||
"silverfish": {
|
||||
"textureLocations": [
|
||||
"res/mob/silverfish"
|
||||
]
|
||||
},
|
||||
"skeleton": {
|
||||
"textureLocations": [
|
||||
"res/mob/skeleton"
|
||||
]
|
||||
},
|
||||
"skeleton.stray": {
|
||||
"textureLocations": [
|
||||
"res/mob/skeleton/stray"
|
||||
]
|
||||
},
|
||||
"skeleton.wither": {
|
||||
"textureLocations": [
|
||||
"res/mob/skeleton_wither"
|
||||
]
|
||||
},
|
||||
"slime": {
|
||||
"textureLocations": [
|
||||
"res/mob/slime"
|
||||
]
|
||||
},
|
||||
"slime.armor": {
|
||||
"textureLocations": [
|
||||
""
|
||||
]
|
||||
},
|
||||
"snowgolem": {
|
||||
"textureLocations": [
|
||||
"res/mob/snowman"
|
||||
]
|
||||
},
|
||||
"spider": {
|
||||
"textureLocations": [
|
||||
"res/mob/spider"
|
||||
]
|
||||
},
|
||||
"squid": {
|
||||
"textureLocations": [
|
||||
"res/mob/squid"
|
||||
]
|
||||
},
|
||||
"trident": {
|
||||
"textureLocations": [
|
||||
"res/item/trident"
|
||||
]
|
||||
},
|
||||
"turtle": {
|
||||
"textureLocations": [
|
||||
"res/mob/sea_turtle"
|
||||
]
|
||||
},
|
||||
"vex": {
|
||||
"textureLocations": [
|
||||
"res/mob/illager/vex",
|
||||
"res/mob/illager/vex_charging"
|
||||
]
|
||||
},
|
||||
"villager": {
|
||||
"textureLocations": [
|
||||
"res/mob/villager/villager",
|
||||
"res/mob/villager/butcher",
|
||||
"res/mob/villager/farmer",
|
||||
"res/mob/villager/librarian",
|
||||
"res/mob/villager/priest",
|
||||
"res/mob/villager/smith"
|
||||
]
|
||||
},
|
||||
"villager.witch": {
|
||||
"textureLocations": [
|
||||
"res/mob/witch"
|
||||
]
|
||||
},
|
||||
"vindicator": {
|
||||
"textureLocations": [
|
||||
"res/mob/illager/vindicator"
|
||||
]
|
||||
},
|
||||
"witherBoss": {
|
||||
"textureLocations": [
|
||||
"res/mob/wither/wither",
|
||||
"res/mob/wither/wither_invulnerable"
|
||||
]
|
||||
},
|
||||
"wolf": {
|
||||
"textureLocations": [
|
||||
"res/mob/wolf",
|
||||
"res/mob/wolf_angry",
|
||||
"res/mob/wolf_tame"
|
||||
]
|
||||
},
|
||||
"zombie": {
|
||||
"textureLocations": [
|
||||
"res/mob/zombie"
|
||||
]
|
||||
},
|
||||
"zombie.husk": {
|
||||
"textureLocations": [
|
||||
"res/mob/zombie/husk"
|
||||
]
|
||||
},
|
||||
"zombie.villager": {
|
||||
"textureLocations": [
|
||||
"res/mob/zombie_villager/zombie_villager",
|
||||
"res/mob/zombie_villager/zombie_butcher",
|
||||
"res/mob/zombie_villager/zombie_farmer",
|
||||
"res/mob/zombie_villager/zombie_librarian",
|
||||
"res/mob/zombie_villager/zombie_priest",
|
||||
"res/mob/zombie_villager/zombie_smith"
|
||||
]
|
||||
},
|
||||
"horse.v2": {
|
||||
// markings and armor no included
|
||||
"textureLocations": [
|
||||
"res/mob/horse/donkey",
|
||||
"res/mob/horse/horse_black",
|
||||
"res/mob/horse/horse_brown",
|
||||
"res/mob/horse/horse_chestnut",
|
||||
"res/mob/horse/horse_creamy",
|
||||
"res/mob/horse/horse_darkbrown",
|
||||
"res/mob/horse/horse_gray",
|
||||
"res/mob/horse/horse_skeleton",
|
||||
"res/mob/horse/horse_white",
|
||||
"res/mob/horse/horse_zombie",
|
||||
"res/mob/horse/mule"
|
||||
]
|
||||
},
|
||||
"cat": {
|
||||
"textureLocations": [
|
||||
"res/mob/cat_black",
|
||||
"res/mob/cat_red",
|
||||
"res/mob/cat_siamese"
|
||||
]
|
||||
},
|
||||
"cod": {
|
||||
"textureLocations": [
|
||||
"res/mob/fish/cod"
|
||||
]
|
||||
},
|
||||
"zombie.drowned": {
|
||||
"textureLocations": [
|
||||
"res/mob/zombie/drowned"
|
||||
]
|
||||
},
|
||||
"endermite": {
|
||||
"textureLocations": [
|
||||
"res/mob/endermite"
|
||||
]
|
||||
},
|
||||
"panda": {
|
||||
"textureLocations": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"pufferfish.large": {
|
||||
"textureLocations": [
|
||||
"res/mob/fish/pufferfish"
|
||||
]
|
||||
},
|
||||
"pufferfish.mid": {
|
||||
"textureLocations": [
|
||||
"res/mob/fish/pufferfish"
|
||||
]
|
||||
},
|
||||
"pufferfish.small": {
|
||||
"textureLocations": [
|
||||
"res/mob/fish/pufferfish"
|
||||
]
|
||||
},
|
||||
"salmon": {
|
||||
"textureLocations": [
|
||||
"res/mob/fish/salmon"
|
||||
]
|
||||
},
|
||||
"skeleton_head": {
|
||||
"textureLocations": [
|
||||
"res/mob/skeleton"
|
||||
]
|
||||
},
|
||||
"skeleton_wither_head": {
|
||||
"textureLocations": [
|
||||
"res/mob/skeleton_wither"
|
||||
]
|
||||
},
|
||||
"stray.armor": {
|
||||
"textureLocations": [
|
||||
"res/mob/skeleton/stray_overlay"
|
||||
]
|
||||
},
|
||||
"stray_armor": {
|
||||
"textureLocations": [
|
||||
"res/mob/skeleton/stray_overlay"
|
||||
]
|
||||
},
|
||||
"tropicalfish_a": {
|
||||
// not including patterns 1-6
|
||||
"textureLocations": [
|
||||
"res/mob/fish/tropical_a"
|
||||
]
|
||||
},
|
||||
"tropicalfish_b": {
|
||||
// not including patterns 1-6
|
||||
"textureLocations": [
|
||||
"res/mob/fish/tropical_b"
|
||||
]
|
||||
},
|
||||
"zombie_head": {
|
||||
"textureLocations": [
|
||||
"res/mob/zombie"
|
||||
]
|
||||
},
|
||||
"mooshroom": {
|
||||
"textureLocations": [
|
||||
"res/mob/redcow"
|
||||
]
|
||||
},
|
||||
"witherBoss.armor": {
|
||||
"textureLocations": [
|
||||
"res/mob/wither/wither_armor"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user