mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-27 05:44:43 +00:00
CustomSkinEditor - Implemented Box editing
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
System.Windows.Forms.Label label3;
|
||||
System.Windows.Forms.Label label7;
|
||||
System.Windows.Forms.Label labelTextureMappingPreview;
|
||||
PckStudio.Internal.SkinANIM skinANIM1 = new PckStudio.Internal.SkinANIM();
|
||||
PckStudio.Internal.SkinANIM skinANIM2 = new PckStudio.Internal.SkinANIM();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.createToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cloneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -57,12 +57,17 @@
|
||||
this.PosZUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.PosYUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.PosXUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.modelPartListBox = new System.Windows.Forms.ListBox();
|
||||
this.skinPartListBox = new System.Windows.Forms.ListBox();
|
||||
this.clampToViewCheckbox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.captureScreenshotButton = new MetroFramework.Controls.MetroButton();
|
||||
this.showToolsCheckBox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.renderer3D1 = new PckStudio.Rendering.SkinRenderer();
|
||||
this.uvPictureBox = new PckStudio.ToolboxItems.InterpolationPictureBox();
|
||||
this.skinNameLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroTabControl1 = new MetroFramework.Controls.MetroTabControl();
|
||||
this.skinPartsTabPage = new System.Windows.Forms.TabPage();
|
||||
this.skinOffsetsTabPage = new System.Windows.Forms.TabPage();
|
||||
this.offsetListBox = new System.Windows.Forms.ListBox();
|
||||
label5 = new System.Windows.Forms.Label();
|
||||
label3 = new System.Windows.Forms.Label();
|
||||
label7 = new System.Windows.Forms.Label();
|
||||
@@ -77,6 +82,9 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.PosYUpDown)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PosXUpDown)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.uvPictureBox)).BeginInit();
|
||||
this.metroTabControl1.SuspendLayout();
|
||||
this.skinPartsTabPage.SuspendLayout();
|
||||
this.skinOffsetsTabPage.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label5
|
||||
@@ -300,15 +308,15 @@
|
||||
-2147483648});
|
||||
this.PosXUpDown.Name = "PosXUpDown";
|
||||
//
|
||||
// modelPartListBox
|
||||
// skinPartListBox
|
||||
//
|
||||
this.modelPartListBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.modelPartListBox.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.modelPartListBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.modelPartListBox, "modelPartListBox");
|
||||
this.modelPartListBox.Name = "modelPartListBox";
|
||||
this.modelPartListBox.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
|
||||
this.modelPartListBox.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick);
|
||||
this.skinPartListBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.skinPartListBox.ContextMenuStrip = this.contextMenuStrip1;
|
||||
resources.ApplyResources(this.skinPartListBox, "skinPartListBox");
|
||||
this.skinPartListBox.FormattingEnabled = true;
|
||||
this.skinPartListBox.Name = "skinPartListBox";
|
||||
this.skinPartListBox.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
|
||||
this.skinPartListBox.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick);
|
||||
//
|
||||
// clampToViewCheckbox
|
||||
//
|
||||
@@ -337,10 +345,11 @@
|
||||
// renderer3D1
|
||||
//
|
||||
resources.ApplyResources(this.renderer3D1, "renderer3D1");
|
||||
this.renderer3D1.ANIM = skinANIM1;
|
||||
this.renderer3D1.ANIM = skinANIM2;
|
||||
this.renderer3D1.BackColor = System.Drawing.Color.DimGray;
|
||||
this.renderer3D1.ClampModel = false;
|
||||
this.renderer3D1.Name = "renderer3D1";
|
||||
this.renderer3D1.RefreshRate = 50;
|
||||
this.renderer3D1.Texture = null;
|
||||
this.renderer3D1.VSync = true;
|
||||
this.renderer3D1.TextureChanging += new System.EventHandler<PckStudio.Rendering.TextureChangingEventArgs>(this.renderer3D1_TextureChanging);
|
||||
@@ -353,14 +362,50 @@
|
||||
this.uvPictureBox.Name = "uvPictureBox";
|
||||
this.uvPictureBox.TabStop = false;
|
||||
//
|
||||
// CustomModelEditor
|
||||
// skinNameLabel
|
||||
//
|
||||
resources.ApplyResources(this.skinNameLabel, "skinNameLabel");
|
||||
this.skinNameLabel.Name = "skinNameLabel";
|
||||
this.skinNameLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroTabControl1
|
||||
//
|
||||
resources.ApplyResources(this.metroTabControl1, "metroTabControl1");
|
||||
this.metroTabControl1.Controls.Add(this.skinPartsTabPage);
|
||||
this.metroTabControl1.Controls.Add(this.skinOffsetsTabPage);
|
||||
this.metroTabControl1.Name = "metroTabControl1";
|
||||
this.metroTabControl1.SelectedIndex = 0;
|
||||
this.metroTabControl1.Style = MetroFramework.MetroColorStyle.Pink;
|
||||
this.metroTabControl1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTabControl1.UseSelectable = true;
|
||||
//
|
||||
// skinPartsTabPage
|
||||
//
|
||||
resources.ApplyResources(this.skinPartsTabPage, "skinPartsTabPage");
|
||||
this.skinPartsTabPage.Controls.Add(this.skinPartListBox);
|
||||
this.skinPartsTabPage.Name = "skinPartsTabPage";
|
||||
//
|
||||
// skinOffsetsTabPage
|
||||
//
|
||||
this.skinOffsetsTabPage.Controls.Add(this.offsetListBox);
|
||||
resources.ApplyResources(this.skinOffsetsTabPage, "skinOffsetsTabPage");
|
||||
this.skinOffsetsTabPage.Name = "skinOffsetsTabPage";
|
||||
//
|
||||
// offsetListBox
|
||||
//
|
||||
resources.ApplyResources(this.offsetListBox, "offsetListBox");
|
||||
this.offsetListBox.FormattingEnabled = true;
|
||||
this.offsetListBox.Name = "offsetListBox";
|
||||
//
|
||||
// CustomSkinEditor
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.metroTabControl1);
|
||||
this.Controls.Add(this.skinNameLabel);
|
||||
this.Controls.Add(this.showToolsCheckBox);
|
||||
this.Controls.Add(this.captureScreenshotButton);
|
||||
this.Controls.Add(this.clampToViewCheckbox);
|
||||
this.Controls.Add(this.modelPartListBox);
|
||||
this.Controls.Add(this.renderer3D1);
|
||||
this.Controls.Add(this.PosZUpDown);
|
||||
this.Controls.Add(this.PosYUpDown);
|
||||
@@ -384,7 +429,7 @@
|
||||
this.Controls.Add(label3);
|
||||
this.Controls.Add(label5);
|
||||
this.Controls.Add(this.uvPictureBox);
|
||||
this.Name = "CustomModelEditor";
|
||||
this.Name = "CustomSkinEditor";
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.generateModel_FormClosing);
|
||||
@@ -398,6 +443,9 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.PosYUpDown)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PosXUpDown)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.uvPictureBox)).EndInit();
|
||||
this.metroTabControl1.ResumeLayout(false);
|
||||
this.skinPartsTabPage.ResumeLayout(false);
|
||||
this.skinOffsetsTabPage.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -428,9 +476,14 @@
|
||||
private System.Windows.Forms.NumericUpDown PosYUpDown;
|
||||
private System.Windows.Forms.NumericUpDown PosXUpDown;
|
||||
private Rendering.SkinRenderer renderer3D1;
|
||||
private System.Windows.Forms.ListBox modelPartListBox;
|
||||
private System.Windows.Forms.ListBox skinPartListBox;
|
||||
private MetroFramework.Controls.MetroCheckBox clampToViewCheckbox;
|
||||
private MetroFramework.Controls.MetroButton captureScreenshotButton;
|
||||
private MetroFramework.Controls.MetroCheckBox showToolsCheckBox;
|
||||
private MetroFramework.Controls.MetroLabel skinNameLabel;
|
||||
private MetroFramework.Controls.MetroTabControl metroTabControl1;
|
||||
private System.Windows.Forms.TabPage skinPartsTabPage;
|
||||
private System.Windows.Forms.TabPage skinOffsetsTabPage;
|
||||
private System.Windows.Forms.ListBox offsetListBox;
|
||||
}
|
||||
}
|
||||
@@ -25,14 +25,15 @@ namespace PckStudio.Forms
|
||||
|
||||
private PckFileData _file;
|
||||
|
||||
private BindingSource skinPartListBindingSource;
|
||||
private BindingSource skinOffsetListBindingSource;
|
||||
|
||||
private static GraphicsConfig _graphicsConfig = new GraphicsConfig()
|
||||
{
|
||||
InterpolationMode = InterpolationMode.NearestNeighbor,
|
||||
PixelOffsetMode = PixelOffsetMode.HighQuality,
|
||||
};
|
||||
|
||||
List<ModelOffset> modelOffsets = new List<ModelOffset>();
|
||||
|
||||
public CustomSkinEditor(PckFileData file)
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -50,15 +51,23 @@ namespace PckStudio.Forms
|
||||
{
|
||||
renderer3D1.ANIM = properties.GetPropertyValue("ANIM", SkinANIM.FromString);
|
||||
var boxProperties = properties.GetProperties("BOX");
|
||||
var offsetProperties = properties.GetProperties("OFFSETS");
|
||||
|
||||
skinNameLabel.Text = properties.HasProperty("DISPLAYNAME") ? properties.GetPropertyValue("DISPLAYNAME") : "";
|
||||
|
||||
Array.ForEach(boxProperties, kv => renderer3D1.ModelData.Add(SkinBOX.FromString(kv.Value)));
|
||||
Array.ForEach(offsetProperties, kv => renderer3D1.SetPartOffset(SkinPartOffset.FromString(kv.Value)));
|
||||
|
||||
modelPartListBox.DataSource = renderer3D1.ModelData;
|
||||
modelPartListBox.DisplayMember = "Type";
|
||||
skinPartListBindingSource = new BindingSource(renderer3D1.ModelData, null);
|
||||
skinPartListBox.DataSource = skinPartListBindingSource;
|
||||
skinPartListBox.DisplayMember = "Type";
|
||||
|
||||
Array.ForEach(properties.GetProperties("OFFSET"), kv => renderer3D1.SetPartOffset(ModelOffset.FromString(kv.Value)));
|
||||
skinOffsetListBindingSource = new BindingSource(renderer3D1.PartOffsets, null);
|
||||
offsetListBox.DataSource = skinOffsetListBindingSource;
|
||||
//offsetListBox.DisplayMember = ""
|
||||
}
|
||||
|
||||
// TODO
|
||||
private void GenerateUVTextureMap()
|
||||
{
|
||||
Random rng = new Random();
|
||||
@@ -90,22 +99,22 @@ namespace PckStudio.Forms
|
||||
{
|
||||
var boxEditor = new BoxEditor(SkinBOX.Empty, false);
|
||||
if (boxEditor.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
renderer3D1.ModelData.Add(boxEditor.Result);
|
||||
skinPartListBindingSource.ResetBindings(false);
|
||||
}
|
||||
}
|
||||
|
||||
//Export Current Skin Texture
|
||||
private void buttonEXPORT_Click(object sender, EventArgs e)
|
||||
{
|
||||
Bitmap bitmap = new Bitmap(uvPictureBox.BackgroundImage, 64, 64);
|
||||
using SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||
saveFileDialog.Filter = "PNG Image Files | *.png";
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
bitmap.Save(saveFileDialog.FileName, ImageFormat.Png);
|
||||
uvPictureBox.BackgroundImage.Save(saveFileDialog.FileName, ImageFormat.Png);
|
||||
}
|
||||
}
|
||||
|
||||
//Imports Skin Texture
|
||||
private void buttonIMPORT_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
@@ -116,15 +125,7 @@ namespace PckStudio.Forms
|
||||
{
|
||||
using (var img = Image.FromFile(openFileDialog.FileName))
|
||||
{
|
||||
if (img.Width == img.Height || img.Height == img.Width / 2)
|
||||
{
|
||||
generateTextureCheckBox.Checked = false;
|
||||
renderer3D1.Texture = img;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(this, "Not a valid skin file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
renderer3D1.Texture = img;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,22 +188,25 @@ namespace PckStudio.Forms
|
||||
var UvY = reader.ReadLine();
|
||||
renderer3D1.ModelData.Add(SkinBOX.FromString($"{part} {PosX} {PosY} {PosZ} {SizeX} {SizeY} {SizeZ} {UvX} {UvY}"));
|
||||
}
|
||||
skinPartListBindingSource.ResetBindings(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void cloneToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (modelPartListBox.SelectedItem is SkinBOX box)
|
||||
if (skinPartListBox.SelectedItem is SkinBOX box)
|
||||
{
|
||||
renderer3D1.ModelData.Add((SkinBOX)box.Clone());
|
||||
skinPartListBindingSource.ResetBindings(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (modelPartListBox.SelectedItem is SkinBOX box)
|
||||
if (skinPartListBox.SelectedItem is SkinBOX box)
|
||||
{
|
||||
renderer3D1.ModelData.Remove(box);
|
||||
skinPartListBindingSource.ResetBindings(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,17 +220,6 @@ namespace PckStudio.Forms
|
||||
e.Cancel = false;*/
|
||||
}
|
||||
|
||||
//Del stuff using key
|
||||
private void delStuffUsingDelKey(object sender, KeyEventArgs e)
|
||||
{
|
||||
//if (e.KeyCode == Keys.Delete && listViewBoxes.SelectedItems.Count != 0 &&
|
||||
// listViewBoxes.SelectedItems[0].Tag is SkinBOX part)
|
||||
//{
|
||||
// if (modelBoxes.Remove(part))
|
||||
// listViewBoxes.SelectedItems[0].Remove();
|
||||
//}
|
||||
}
|
||||
|
||||
private void OpenJSONButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
@@ -320,35 +313,36 @@ namespace PckStudio.Forms
|
||||
MessageBox.Show("Invalid image dimensions.", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
generateTextureCheckBox.Checked = false;
|
||||
uvPictureBox.BackgroundImage = img;
|
||||
}
|
||||
|
||||
private void listBox1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (modelPartListBox.SelectedItem is SkinBOX box)
|
||||
if (skinPartListBox.SelectedItem is SkinBOX box)
|
||||
{
|
||||
var boxEditor = new BoxEditor(box, false);
|
||||
if (boxEditor.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
renderer3D1.ModelData[modelPartListBox.SelectedIndex] = boxEditor.Result;
|
||||
modelPartListBox.Update();
|
||||
renderer3D1.ModelData[skinPartListBox.SelectedIndex] = boxEditor.Result;
|
||||
skinPartListBindingSource.ResetItem(skinPartListBox.SelectedIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (modelPartListBox.SelectedItem is SkinBOX box)
|
||||
if (skinPartListBox.SelectedItem is SkinBOX box)
|
||||
{
|
||||
int scale = 3;
|
||||
uvPictureBox.Image = new Bitmap(uvPictureBox.BackgroundImage.Width * scale, uvPictureBox.BackgroundImage.Height * scale);
|
||||
using (Graphics g = Graphics.FromImage(uvPictureBox.Image))
|
||||
{
|
||||
float penWidth = renderer3D1.UvTranslation.X * uvPictureBox.BackgroundImage.Width + renderer3D1.UvTranslation.Y * uvPictureBox.BackgroundImage.Height / 2f;
|
||||
float penWidth = uvPictureBox.BackgroundImage.Width / renderer3D1.TextureSize.Width + uvPictureBox.BackgroundImage.Height / renderer3D1.TextureSize.Height / 2f;
|
||||
GraphicsPath graphicsPath = box.GetUVGraphicsPath(
|
||||
new System.Numerics.Vector2(
|
||||
scale * renderer3D1.UvTranslation.X * uvPictureBox.BackgroundImage.Width,
|
||||
scale * renderer3D1.UvTranslation.Y * uvPictureBox.BackgroundImage.Height
|
||||
scale * (1f / renderer3D1.TextureSize.Width) * uvPictureBox.BackgroundImage.Width,
|
||||
scale * (1f / renderer3D1.TextureSize.Height) * uvPictureBox.BackgroundImage.Height
|
||||
)
|
||||
);
|
||||
g.DrawPath(new Pen(Color.HotPink, penWidth), graphicsPath);
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>26</value>
|
||||
<value>27</value>
|
||||
</data>
|
||||
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
@@ -190,7 +190,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>25</value>
|
||||
<value>26</value>
|
||||
</data>
|
||||
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
@@ -226,7 +226,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label7.ZOrder" xml:space="preserve">
|
||||
<value>23</value>
|
||||
<value>24</value>
|
||||
</data>
|
||||
<metadata name="labelTextureMappingPreview.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
@@ -262,11 +262,20 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>labelTextureMappingPreview.ZOrder" xml:space="preserve">
|
||||
<value>21</value>
|
||||
<value>22</value>
|
||||
</data>
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="contextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 108</value>
|
||||
</data>
|
||||
<data name=">>contextMenuStrip1.Name" xml:space="preserve">
|
||||
<value>contextMenuStrip1</value>
|
||||
</data>
|
||||
<data name=">>contextMenuStrip1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="createToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
@@ -339,15 +348,6 @@
|
||||
<data name="changeColorToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Change Color</value>
|
||||
</data>
|
||||
<data name="contextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 108</value>
|
||||
</data>
|
||||
<data name=">>contextMenuStrip1.Name" xml:space="preserve">
|
||||
<value>contextMenuStrip1</value>
|
||||
</data>
|
||||
<data name=">>contextMenuStrip1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="buttonDone.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
@@ -373,7 +373,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>buttonDone.ZOrder" xml:space="preserve">
|
||||
<value>24</value>
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="buttonEXPORT.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -400,7 +400,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>buttonEXPORT.ZOrder" xml:space="preserve">
|
||||
<value>20</value>
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="buttonIMPORT.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -427,7 +427,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>buttonIMPORT.ZOrder" xml:space="preserve">
|
||||
<value>22</value>
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="buttonImportModel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Left</value>
|
||||
@@ -457,7 +457,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>buttonImportModel.ZOrder" xml:space="preserve">
|
||||
<value>19</value>
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="buttonExportModel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Left</value>
|
||||
@@ -487,7 +487,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>buttonExportModel.ZOrder" xml:space="preserve">
|
||||
<value>18</value>
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="OpenJSONButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Left</value>
|
||||
@@ -517,7 +517,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>OpenJSONButton.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="generateTextureCheckBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -547,7 +547,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>generateTextureCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="checkGuide.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -577,7 +577,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>checkGuide.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="checkBoxArmor.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -607,13 +607,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>checkBoxArmor.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="SizeXUpDown.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="SizeXUpDown.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>685, 372</value>
|
||||
<value>674, 371</value>
|
||||
</data>
|
||||
<data name="SizeXUpDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 20</value>
|
||||
@@ -634,13 +634,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>SizeXUpDown.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="SizeYUpDown.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="SizeYUpDown.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>744, 372</value>
|
||||
<value>733, 371</value>
|
||||
</data>
|
||||
<data name="SizeYUpDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 20</value>
|
||||
@@ -661,13 +661,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>SizeYUpDown.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="SizeZUpDown.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="SizeZUpDown.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>803, 372</value>
|
||||
<value>792, 371</value>
|
||||
</data>
|
||||
<data name="SizeZUpDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>58, 20</value>
|
||||
@@ -688,7 +688,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>SizeZUpDown.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="TextureXUpDown.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -712,7 +712,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>TextureXUpDown.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="TextureYUpDown.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -736,13 +736,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>TextureYUpDown.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="PosZUpDown.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="PosZUpDown.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>803, 404</value>
|
||||
<value>792, 403</value>
|
||||
</data>
|
||||
<data name="PosZUpDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>58, 20</value>
|
||||
@@ -763,13 +763,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>PosZUpDown.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="PosYUpDown.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="PosYUpDown.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>744, 404</value>
|
||||
<value>733, 403</value>
|
||||
</data>
|
||||
<data name="PosYUpDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 20</value>
|
||||
@@ -790,13 +790,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>PosYUpDown.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="PosXUpDown.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="PosXUpDown.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>685, 404</value>
|
||||
<value>674, 403</value>
|
||||
</data>
|
||||
<data name="PosXUpDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 20</value>
|
||||
@@ -817,28 +817,31 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>PosXUpDown.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="modelPartListBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>23, 59</value>
|
||||
<data name="skinPartListBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="modelPartListBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>165, 481</value>
|
||||
<data name="skinPartListBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="modelPartListBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<data name="skinPartListBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>157, 440</value>
|
||||
</data>
|
||||
<data name="skinPartListBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>161</value>
|
||||
</data>
|
||||
<data name=">>modelPartListBox.Name" xml:space="preserve">
|
||||
<value>modelPartListBox</value>
|
||||
<data name=">>skinPartListBox.Name" xml:space="preserve">
|
||||
<value>skinPartListBox</value>
|
||||
</data>
|
||||
<data name=">>modelPartListBox.Type" xml:space="preserve">
|
||||
<data name=">>skinPartListBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>modelPartListBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<data name=">>skinPartListBox.Parent" xml:space="preserve">
|
||||
<value>skinPartsTabPage</value>
|
||||
</data>
|
||||
<data name=">>modelPartListBox.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<data name=">>skinPartListBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="clampToViewCheckbox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -868,7 +871,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>clampToViewCheckbox.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="captureScreenshotButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Left</value>
|
||||
@@ -895,7 +898,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>captureScreenshotButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="showToolsCheckBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -925,7 +928,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>showToolsCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="renderer3D1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Bottom, Left, Right</value>
|
||||
@@ -949,7 +952,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>renderer3D1.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="uvPictureBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -982,7 +985,148 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>uvPictureBox.ZOrder" xml:space="preserve">
|
||||
<value>27</value>
|
||||
<value>28</value>
|
||||
</data>
|
||||
<data name="skinNameLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Left</value>
|
||||
</data>
|
||||
<data name="skinNameLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="skinNameLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>23, 549</value>
|
||||
</data>
|
||||
<data name="skinNameLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>73, 19</value>
|
||||
</data>
|
||||
<data name="skinNameLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>165</value>
|
||||
</data>
|
||||
<data name="skinNameLabel.Text" xml:space="preserve">
|
||||
<value>nameLabel</value>
|
||||
</data>
|
||||
<data name=">>skinNameLabel.Name" xml:space="preserve">
|
||||
<value>skinNameLabel</value>
|
||||
</data>
|
||||
<data name=">>skinNameLabel.Type" xml:space="preserve">
|
||||
<value>MetroFramework.Controls.MetroLabel, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
|
||||
</data>
|
||||
<data name=">>skinNameLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>skinNameLabel.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="metroTabControl1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Bottom, Left</value>
|
||||
</data>
|
||||
<data name="skinPartsTabPage.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="skinPartsTabPage.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>4, 38</value>
|
||||
</data>
|
||||
<data name="skinPartsTabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>157, 440</value>
|
||||
</data>
|
||||
<data name="skinPartsTabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="skinPartsTabPage.Text" xml:space="preserve">
|
||||
<value>Parts</value>
|
||||
</data>
|
||||
<data name=">>skinPartsTabPage.Name" xml:space="preserve">
|
||||
<value>skinPartsTabPage</value>
|
||||
</data>
|
||||
<data name=">>skinPartsTabPage.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>skinPartsTabPage.Parent" xml:space="preserve">
|
||||
<value>metroTabControl1</value>
|
||||
</data>
|
||||
<data name=">>skinPartsTabPage.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>offsetListBox.Name" xml:space="preserve">
|
||||
<value>offsetListBox</value>
|
||||
</data>
|
||||
<data name=">>offsetListBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>offsetListBox.Parent" xml:space="preserve">
|
||||
<value>skinOffsetsTabPage</value>
|
||||
</data>
|
||||
<data name=">>offsetListBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="skinOffsetsTabPage.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>4, 38</value>
|
||||
</data>
|
||||
<data name="skinOffsetsTabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>157, 440</value>
|
||||
</data>
|
||||
<data name="skinOffsetsTabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="skinOffsetsTabPage.Text" xml:space="preserve">
|
||||
<value>Offsets</value>
|
||||
</data>
|
||||
<data name=">>skinOffsetsTabPage.Name" xml:space="preserve">
|
||||
<value>skinOffsetsTabPage</value>
|
||||
</data>
|
||||
<data name=">>skinOffsetsTabPage.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>skinOffsetsTabPage.Parent" xml:space="preserve">
|
||||
<value>metroTabControl1</value>
|
||||
</data>
|
||||
<data name=">>skinOffsetsTabPage.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="metroTabControl1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>23, 59</value>
|
||||
</data>
|
||||
<data name="metroTabControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>165, 482</value>
|
||||
</data>
|
||||
<data name="metroTabControl1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>166</value>
|
||||
</data>
|
||||
<data name=">>metroTabControl1.Name" xml:space="preserve">
|
||||
<value>metroTabControl1</value>
|
||||
</data>
|
||||
<data name=">>metroTabControl1.Type" xml:space="preserve">
|
||||
<value>MetroFramework.Controls.MetroTabControl, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
|
||||
</data>
|
||||
<data name=">>metroTabControl1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>metroTabControl1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="offsetListBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="offsetListBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="offsetListBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>157, 440</value>
|
||||
</data>
|
||||
<data name="offsetListBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>offsetListBox.Name" xml:space="preserve">
|
||||
<value>offsetListBox</value>
|
||||
</data>
|
||||
<data name=">>offsetListBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>offsetListBox.Parent" xml:space="preserve">
|
||||
<value>skinOffsetsTabPage</value>
|
||||
</data>
|
||||
<data name=">>offsetListBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
@@ -3536,7 +3680,7 @@
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>CustomModelEditor</value>
|
||||
<value>CustomSkinEditor</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>MetroFramework.Forms.MetroForm, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Text.RegularExpressions;
|
||||
|
||||
namespace PckStudio.Internal
|
||||
{
|
||||
internal readonly struct ModelOffset
|
||||
internal readonly struct SkinPartOffset
|
||||
{
|
||||
private static readonly Regex sWhitespace = new Regex(@"\s+");
|
||||
internal static string ReplaceWhitespace(string input, string replacement)
|
||||
@@ -24,12 +24,19 @@ namespace PckStudio.Internal
|
||||
"ARM1",
|
||||
"LEG0",
|
||||
"LEG1",
|
||||
"PANTS0",
|
||||
"PANTS1",
|
||||
"BOOTS0",
|
||||
"BOOTS1",
|
||||
|
||||
// Armor Offsets
|
||||
"HELMET",
|
||||
"CHEST", "BODYARMOR",
|
||||
"SHOULDER0", "ARMARMOR0",
|
||||
"SHOULDER1", "ARMARMOR1",
|
||||
"CHEST",
|
||||
"BODYARMOR",
|
||||
"SHOULDER0",
|
||||
"SHOULDER1",
|
||||
"ARMARMOR0",
|
||||
"ARMARMOR1",
|
||||
"BELT",
|
||||
"LEGGING0",
|
||||
"LEGGING1",
|
||||
@@ -43,13 +50,13 @@ namespace PckStudio.Internal
|
||||
public readonly string Name;
|
||||
public readonly float Value;
|
||||
|
||||
public ModelOffset(string name, float value)
|
||||
public SkinPartOffset(string name, float value)
|
||||
{
|
||||
Name = name;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public static ModelOffset FromString(string offsetFormatString)
|
||||
public static SkinPartOffset FromString(string offsetFormatString)
|
||||
{
|
||||
string[] offset = ReplaceWhitespace(offsetFormatString.TrimEnd('\n', '\r', ' '), ",").Split(',');
|
||||
if (offset.Length < 3)
|
||||
@@ -59,7 +66,7 @@ namespace PckStudio.Internal
|
||||
|
||||
if (!ValidModelOffsetTypes.Contains(name))
|
||||
{
|
||||
Debug.WriteLine($"'{name}' is an invalid offset type.");
|
||||
Debug.WriteLine($"'{name}' is an invalid offset type.", category: nameof(SkinPartOffset));
|
||||
}
|
||||
|
||||
// Ignore => Y assumed
|
||||
@@ -67,9 +74,9 @@ namespace PckStudio.Internal
|
||||
|
||||
if (!float.TryParse(offset[2], out float value))
|
||||
{
|
||||
Debug.WriteLine($"Failed to parse y offset for: '{name}'");
|
||||
Debug.WriteLine($"Failed to parse y offset for: '{name}'", category: nameof(SkinPartOffset));
|
||||
}
|
||||
return new ModelOffset(name, value);
|
||||
return new SkinPartOffset(name, value);
|
||||
}
|
||||
|
||||
public (string, string) ToProperty()
|
||||
@@ -140,7 +140,7 @@
|
||||
<Compile Include="Extensions\SkinBOXExtensions.cs" />
|
||||
<Compile Include="Extensions\System.Numerics.cs" />
|
||||
<Compile Include="Extensions\TreeNodeExtensions.cs" />
|
||||
<Compile Include="Internal\ModelOffset.cs" />
|
||||
<Compile Include="Internal\SkinPartOffset.cs" />
|
||||
<Compile Include="Helper\AnimationHelper.cs" />
|
||||
<Compile Include="Internal\AnimationCategory.cs" />
|
||||
<Compile Include="Internal\SkinAnimFlag.cs" />
|
||||
|
||||
@@ -80,7 +80,8 @@ namespace PckStudio.Rendering
|
||||
}
|
||||
|
||||
public ObservableCollection<SkinBOX> ModelData { get; }
|
||||
|
||||
public ReadOnlyDictionary<string, float> PartOffsets => new ReadOnlyDictionary<string, float>(partOffset);
|
||||
|
||||
/// <summary>
|
||||
/// Captures the currently displayed frame
|
||||
/// </summary>
|
||||
@@ -190,12 +191,12 @@ namespace PckStudio.Rendering
|
||||
|
||||
private bool showWireFrame = false;
|
||||
|
||||
internal Matrix4 HeadMatrix { get; set; } = Matrix4.Identity;
|
||||
internal Matrix4 BodyMatrix { get; set; } = Matrix4.Identity;
|
||||
internal Matrix4 RightArmMatrix { get; set; } = Matrix4.CreateFromAxisAngle(Vector3.UnitZ, 25f);
|
||||
internal Matrix4 LeftArmMatrix { get; set; } = Matrix4.CreateFromAxisAngle(Vector3.UnitZ, -25f);
|
||||
internal Matrix4 RightLegMatrix { get; set; } = Matrix4.Identity;
|
||||
internal Matrix4 LeftLegMatrix { get; set; } = Matrix4.Identity;
|
||||
private Matrix4 HeadMatrix { get; set; } = Matrix4.Identity;
|
||||
private Matrix4 BodyMatrix { get; set; } = Matrix4.Identity;
|
||||
private Matrix4 RightArmMatrix { get; set; } = Matrix4.CreateFromAxisAngle(Vector3.UnitZ, 25f);
|
||||
private Matrix4 LeftArmMatrix { get; set; } = Matrix4.CreateFromAxisAngle(Vector3.UnitZ, -25f);
|
||||
private Matrix4 RightLegMatrix { get; set; } = Matrix4.Identity;
|
||||
private Matrix4 LeftLegMatrix { get; set; } = Matrix4.Identity;
|
||||
|
||||
public SkinRenderer() : base()
|
||||
{
|
||||
@@ -257,7 +258,7 @@ namespace PckStudio.Rendering
|
||||
};
|
||||
}
|
||||
|
||||
public void SetPartOffset(ModelOffset offset)
|
||||
public void SetPartOffset(SkinPartOffset offset)
|
||||
{
|
||||
SetPartOffset(offset.Name, offset.Value);
|
||||
}
|
||||
@@ -739,7 +740,7 @@ namespace PckStudio.Rendering
|
||||
animationCurrentRotationAngle += animationRotationStep;
|
||||
if (animationCurrentRotationAngle >= animationMaxAngleInDegrees || animationCurrentRotationAngle <= -animationMaxAngleInDegrees)
|
||||
animationRotationStep = -animationRotationStep;
|
||||
}
|
||||
}
|
||||
|
||||
private void ReInitialzeSkinData()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user