Merge branch 'main' into TextureAtlasEditor

This commit is contained in:
miku-666
2023-08-06 15:13:36 +02:00
13 changed files with 969 additions and 912 deletions

View File

@@ -8,6 +8,7 @@
Average,
DescendingOrder,
AscendingOrder,
Screen
Screen,
Overlay
}
}

View File

@@ -33,6 +33,7 @@ namespace PckStudio.Extensions
BlendMode.AscendingOrder => source > overlay ? overlay : source,
BlendMode.DescendingOrder => source < overlay ? overlay : source,
BlendMode.Screen => 1f - (1f - source) * (1f - overlay),
BlendMode.Overlay => source < 0.5f ? 2f * source * overlay : 1f - 2f * (1f - source) * (1f - overlay),
_ => 0.0f
};
return MathExtensions.Clamp(resultValue, 0.0f, 1.0f);

View File

@@ -28,111 +28,131 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.PictureBox pictureBox1;
MetroFramework.Controls.MetroLabel metroLabel1;
MetroFramework.Controls.MetroLabel metroLabel2;
MetroFramework.Controls.MetroLabel metroLabel3;
MetroFramework.Controls.MetroLabel metroLabel4;
MetroFramework.Controls.MetroLabel metroLabel5;
MetroFramework.Controls.MetroLabel metroLabel6;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CreditsForm));
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
this.metroLabel4 = new MetroFramework.Controls.MetroLabel();
this.metroLabel5 = new MetroFramework.Controls.MetroLabel();
this.metroLabel6 = new MetroFramework.Controls.MetroLabel();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.buildLabel = new MetroFramework.Controls.MetroLabel();
pictureBox1 = new System.Windows.Forms.PictureBox();
metroLabel1 = new MetroFramework.Controls.MetroLabel();
metroLabel2 = new MetroFramework.Controls.MetroLabel();
metroLabel3 = new MetroFramework.Controls.MetroLabel();
metroLabel4 = new MetroFramework.Controls.MetroLabel();
metroLabel5 = new MetroFramework.Controls.MetroLabel();
metroLabel6 = new MetroFramework.Controls.MetroLabel();
((System.ComponentModel.ISupportInitialize)(pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
this.pictureBox1.Enabled = false;
this.pictureBox1.Image = global::PckStudio.Properties.Resources.Splash;
this.pictureBox1.Location = new System.Drawing.Point(4, 5);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(0, 0, 11, 0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(550, 293);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
this.pictureBox1.DoubleClick += new System.EventHandler(this.pictureBox1_Click);
pictureBox1.BackColor = System.Drawing.Color.Transparent;
pictureBox1.Enabled = false;
pictureBox1.Image = global::PckStudio.Properties.Resources.Splash;
pictureBox1.Location = new System.Drawing.Point(4, 5);
pictureBox1.Margin = new System.Windows.Forms.Padding(0, 0, 11, 0);
pictureBox1.Name = "pictureBox1";
pictureBox1.Size = new System.Drawing.Size(550, 293);
pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
pictureBox1.TabIndex = 0;
pictureBox1.TabStop = false;
//
// metroLabel1
//
this.metroLabel1.AutoSize = true;
this.metroLabel1.Enabled = false;
this.metroLabel1.Location = new System.Drawing.Point(4, 301);
this.metroLabel1.Name = "metroLabel1";
this.metroLabel1.Size = new System.Drawing.Size(250, 19);
this.metroLabel1.TabIndex = 1;
this.metroLabel1.Text = "Restored and maintained by PhoenixARC";
this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
metroLabel1.AutoSize = true;
metroLabel1.Enabled = false;
metroLabel1.Location = new System.Drawing.Point(4, 301);
metroLabel1.Name = "metroLabel1";
metroLabel1.Size = new System.Drawing.Size(250, 19);
metroLabel1.TabIndex = 1;
metroLabel1.Text = "Restored and maintained by PhoenixARC";
metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroLabel2
//
this.metroLabel2.AutoSize = true;
this.metroLabel2.Enabled = false;
this.metroLabel2.Location = new System.Drawing.Point(314, 301);
this.metroLabel2.Name = "metroLabel2";
this.metroLabel2.Size = new System.Drawing.Size(269, 19);
this.metroLabel2.TabIndex = 2;
this.metroLabel2.Text = "Utilizing the Nobledez Website by Newagent";
this.metroLabel2.Theme = MetroFramework.MetroThemeStyle.Dark;
metroLabel2.AutoSize = true;
metroLabel2.Enabled = false;
metroLabel2.Location = new System.Drawing.Point(314, 301);
metroLabel2.Name = "metroLabel2";
metroLabel2.Size = new System.Drawing.Size(269, 19);
metroLabel2.TabIndex = 2;
metroLabel2.Text = "Utilizing the Nobledez Website by Newagent";
metroLabel2.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroLabel3
//
this.metroLabel3.AutoSize = true;
this.metroLabel3.Enabled = false;
this.metroLabel3.Location = new System.Drawing.Point(314, 339);
this.metroLabel3.Name = "metroLabel3";
this.metroLabel3.Size = new System.Drawing.Size(212, 19);
this.metroLabel3.TabIndex = 3;
this.metroLabel3.Text = "3D skin renderer by Łukasz Rejman";
this.metroLabel3.Theme = MetroFramework.MetroThemeStyle.Dark;
metroLabel3.AutoSize = true;
metroLabel3.Enabled = false;
metroLabel3.Location = new System.Drawing.Point(314, 339);
metroLabel3.Name = "metroLabel3";
metroLabel3.Size = new System.Drawing.Size(212, 19);
metroLabel3.TabIndex = 3;
metroLabel3.Text = "3D skin renderer by Łukasz Rejman";
metroLabel3.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroLabel4
//
this.metroLabel4.AutoSize = true;
this.metroLabel4.Enabled = false;
this.metroLabel4.Location = new System.Drawing.Point(314, 320);
this.metroLabel4.Name = "metroLabel4";
this.metroLabel4.Size = new System.Drawing.Size(199, 19);
this.metroLabel4.TabIndex = 4;
this.metroLabel4.Text = "3D renderer found by Newagent";
this.metroLabel4.Theme = MetroFramework.MetroThemeStyle.Dark;
metroLabel4.AutoSize = true;
metroLabel4.Enabled = false;
metroLabel4.Location = new System.Drawing.Point(314, 320);
metroLabel4.Name = "metroLabel4";
metroLabel4.Size = new System.Drawing.Size(199, 19);
metroLabel4.TabIndex = 4;
metroLabel4.Text = "3D renderer found by Newagent";
metroLabel4.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroLabel5
//
this.metroLabel5.AutoSize = true;
this.metroLabel5.Enabled = false;
this.metroLabel5.Location = new System.Drawing.Point(4, 320);
this.metroLabel5.Name = "metroLabel5";
this.metroLabel5.Size = new System.Drawing.Size(300, 19);
this.metroLabel5.TabIndex = 5;
this.metroLabel5.Text = "Additional development by MattNL and Miku-666";
this.metroLabel5.Theme = MetroFramework.MetroThemeStyle.Dark;
metroLabel5.AutoSize = true;
metroLabel5.Enabled = false;
metroLabel5.Location = new System.Drawing.Point(4, 320);
metroLabel5.Name = "metroLabel5";
metroLabel5.Size = new System.Drawing.Size(300, 19);
metroLabel5.TabIndex = 5;
metroLabel5.Text = "Additional development by MattNL and Miku-666";
metroLabel5.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// metroLabel6
//
this.metroLabel6.AutoSize = true;
this.metroLabel6.Enabled = false;
this.metroLabel6.Location = new System.Drawing.Point(4, 339);
this.metroLabel6.Name = "metroLabel6";
this.metroLabel6.Size = new System.Drawing.Size(203, 19);
this.metroLabel6.TabIndex = 6;
this.metroLabel6.Text = "Code base overhaul by Miku-666";
this.metroLabel6.Theme = MetroFramework.MetroThemeStyle.Dark;
metroLabel6.AutoSize = true;
metroLabel6.Enabled = false;
metroLabel6.Location = new System.Drawing.Point(4, 339);
metroLabel6.Name = "metroLabel6";
metroLabel6.Size = new System.Drawing.Size(203, 19);
metroLabel6.TabIndex = 6;
metroLabel6.Text = "Code base overhaul by Miku-666";
metroLabel6.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// buildLabel
//
this.buildLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(34)))), ((int)(((byte)(56)))));
this.buildLabel.Enabled = false;
this.buildLabel.ForeColor = System.Drawing.SystemColors.Control;
this.buildLabel.Location = new System.Drawing.Point(314, 30);
this.buildLabel.Name = "buildLabel";
this.buildLabel.Size = new System.Drawing.Size(212, 171);
this.buildLabel.TabIndex = 7;
this.buildLabel.Text = "Build Information";
this.buildLabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.buildLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
//
// CreditsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(585, 364);
this.Controls.Add(this.metroLabel6);
this.Controls.Add(this.metroLabel1);
this.Controls.Add(this.metroLabel5);
this.Controls.Add(this.metroLabel4);
this.Controls.Add(this.metroLabel3);
this.Controls.Add(this.metroLabel2);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.buildLabel);
this.Controls.Add(metroLabel6);
this.Controls.Add(metroLabel1);
this.Controls.Add(metroLabel5);
this.Controls.Add(metroLabel4);
this.Controls.Add(metroLabel3);
this.Controls.Add(metroLabel2);
this.Controls.Add(pictureBox1);
this.DisplayHeader = false;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
@@ -144,7 +164,7 @@
this.Style = MetroFramework.MetroColorStyle.Black;
this.Text = "programInfo";
this.Theme = MetroFramework.MetroThemeStyle.Dark;
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -153,12 +173,6 @@
#endregion
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
private System.Windows.Forms.PictureBox pictureBox1;
private MetroFramework.Controls.MetroLabel metroLabel1;
private MetroFramework.Controls.MetroLabel metroLabel2;
private MetroFramework.Controls.MetroLabel metroLabel3;
private MetroFramework.Controls.MetroLabel metroLabel4;
private MetroFramework.Controls.MetroLabel metroLabel5;
private MetroFramework.Controls.MetroLabel metroLabel6;
}
private MetroFramework.Controls.MetroLabel buildLabel;
}
}

View File

@@ -1,24 +1,22 @@
using System;
using System.Windows.Forms;
using MetroFramework.Forms;
using PckStudio.Internal;
namespace PckStudio
{
public partial class CreditsForm : MetroForm
{
int count = 0;
public CreditsForm()
{
InitializeComponent();
#if BETA
buildLabel.Text = $"[Beta] {ApplicationBuildInfo.BetaBuildVersion}@{CommitInfo.BranchName}";
#elif DEBUG
buildLabel.Text = $"[Debug] {CommitInfo.BranchName}@{CommitInfo.CommitHash}";
#else
buildLabel.Text = string.Empty;
#endif
}
private void pictureBox1_Click(object sender, EventArgs e)
{
if (++count == 5)
{
MessageBox.Show("🌸Miku🌸 was here!");
count = 0;
}
}
}
}
}

View File

@@ -117,6 +117,27 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="pictureBox1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="metroLabel1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="metroLabel2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="metroLabel3.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="metroLabel4.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="metroLabel5.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="metroLabel6.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>

View File

@@ -9,6 +9,7 @@ using OMI.Formats.Pck;
using PckStudio.Internal;
using PckStudio.Forms.Editor;
using PckStudio.Classes.IO._3DST;
using PckStudio.Properties;
namespace PckStudio
{
@@ -24,7 +25,6 @@ namespace PckStudio
SkinANIM anim = new SkinANIM();
eSkinType skinType;
PckFile.PCKProperties generatedModel = new PckFile.PCKProperties();
enum eSkinType : int
{
@@ -281,28 +281,22 @@ namespace PckStudio
//Prompt for skin model generator
if (MessageBox.Show("Create your own custom skin model?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) != DialogResult.Yes)
return;
generateModel generate = new generateModel(generatedModel, Properties.Resources.classic_template);
if (generate.ShowDialog() == DialogResult.OK) //Opens Model Generator Dialog
using var ms = new MemoryStream();
Resources.classic_template.Save(ms, ImageFormat.Png);
skin.SetData(ms.ToArray());
generateModel generate = new generateModel(skin);
if (generate.ShowDialog() == DialogResult.OK)
{
try
displayBox.Image = generate.PreviewImage;
buttonDone.Enabled = true;
labelSelectTexture.Visible = false;
if (skinType != eSkinType._64x64 && skinType != eSkinType._64x64HD)
{
using (FileStream stream = File.OpenRead(Application.StartupPath + "\\temp.png"))
{
skinPictureBoxTexture.Image = Image.FromStream(stream);
}
buttonDone.Enabled = true;
labelSelectTexture.Visible = false;
if (skinType != eSkinType._64x64 && skinType != eSkinType._64x64HD)
{
buttonSkin.Location = new Point(buttonSkin.Location.X - skinPictureBoxTexture.Width, buttonSkin.Location.Y);
skinType = eSkinType._64x64;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
buttonSkin.Location = new Point(buttonSkin.Location.X - skinPictureBoxTexture.Width, buttonSkin.Location.Y);
skinType = eSkinType._64x64;
}
}
}

View File

@@ -29,7 +29,12 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label label6;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(generateModel));
System.Windows.Forms.Label label5;
System.Windows.Forms.Label label3;
System.Windows.Forms.Label label7;
System.Windows.Forms.Label labelTextureMappingPreview;
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.createToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.cloneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -52,21 +57,16 @@
this.label13 = new System.Windows.Forms.Label();
this.offsetHead = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.comboParent = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.buttonEXPORT = new System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label();
this.buttonIMPORT = new System.Windows.Forms.Button();
this.texturePreview = new System.Windows.Forms.PictureBox();
this.labelTextureMappingPreview = new System.Windows.Forms.Label();
this.uvPictureBox = new PckStudio.PictureBoxWithInterpolationMode();
this.buttonImportModel = new System.Windows.Forms.Button();
this.displayBox = new System.Windows.Forms.PictureBox();
this.buttonExportModel = new System.Windows.Forms.Button();
this.OpenJSONButton = new System.Windows.Forms.Button();
this.buttonTemplate = new MetroFramework.Controls.MetroButton();
this.checkTextureGenerate = new MetroFramework.Controls.MetroCheckBox();
this.generateTextureCheckBox = new MetroFramework.Controls.MetroCheckBox();
this.checkGuide = new MetroFramework.Controls.MetroCheckBox();
this.checkBoxArmor = new MetroFramework.Controls.MetroCheckBox();
this.SizeXUpDown = new System.Windows.Forms.NumericUpDown();
@@ -87,12 +87,17 @@
this.U = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.V = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.listViewBoxes = new System.Windows.Forms.ListView();
label6 = new System.Windows.Forms.Label();
label5 = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
label7 = new System.Windows.Forms.Label();
labelTextureMappingPreview = new System.Windows.Forms.Label();
this.contextMenuStrip1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabBody.SuspendLayout();
this.tabPage1.SuspendLayout();
this.myTablePanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.texturePreview)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.uvPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.displayBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.SizeXUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.SizeYUpDown)).BeginInit();
@@ -104,6 +109,36 @@
((System.ComponentModel.ISupportInitialize)(this.PosXUpDown)).BeginInit();
this.SuspendLayout();
//
// label6
//
resources.ApplyResources(label6, "label6");
label6.ForeColor = System.Drawing.Color.White;
label6.Name = "label6";
//
// label5
//
resources.ApplyResources(label5, "label5");
label5.ForeColor = System.Drawing.Color.White;
label5.Name = "label5";
//
// label3
//
resources.ApplyResources(label3, "label3");
label3.ForeColor = System.Drawing.Color.White;
label3.Name = "label3";
//
// label7
//
resources.ApplyResources(label7, "label7");
label7.ForeColor = System.Drawing.Color.White;
label7.Name = "label7";
//
// labelTextureMappingPreview
//
resources.ApplyResources(labelTextureMappingPreview, "labelTextureMappingPreview");
labelTextureMappingPreview.ForeColor = System.Drawing.Color.White;
labelTextureMappingPreview.Name = "labelTextureMappingPreview";
//
// contextMenuStrip1
//
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
@@ -260,12 +295,6 @@
this.label12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.label12.Name = "label12";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.ForeColor = System.Drawing.Color.White;
this.label6.Name = "label6";
//
// comboParent
//
this.comboParent.FormattingEnabled = true;
@@ -280,18 +309,6 @@
this.comboParent.Name = "comboParent";
this.comboParent.SelectedValueChanged += new System.EventHandler(this.comboParent_SelectedIndexChanged);
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.ForeColor = System.Drawing.Color.White;
this.label5.Name = "label5";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.ForeColor = System.Drawing.Color.White;
this.label3.Name = "label3";
//
// buttonEXPORT
//
resources.ApplyResources(this.buttonEXPORT, "buttonEXPORT");
@@ -300,12 +317,6 @@
this.buttonEXPORT.UseVisualStyleBackColor = true;
this.buttonEXPORT.Click += new System.EventHandler(this.buttonEXPORT_Click);
//
// label7
//
resources.ApplyResources(this.label7, "label7");
this.label7.ForeColor = System.Drawing.Color.White;
this.label7.Name = "label7";
//
// buttonIMPORT
//
resources.ApplyResources(this.buttonIMPORT, "buttonIMPORT");
@@ -314,18 +325,13 @@
this.buttonIMPORT.UseVisualStyleBackColor = true;
this.buttonIMPORT.Click += new System.EventHandler(this.buttonIMPORT_Click);
//
// texturePreview
// uvPictureBox
//
this.texturePreview.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
resources.ApplyResources(this.texturePreview, "texturePreview");
this.texturePreview.Name = "texturePreview";
this.texturePreview.TabStop = false;
//
// labelTextureMappingPreview
//
resources.ApplyResources(this.labelTextureMappingPreview, "labelTextureMappingPreview");
this.labelTextureMappingPreview.ForeColor = System.Drawing.Color.White;
this.labelTextureMappingPreview.Name = "labelTextureMappingPreview";
this.uvPictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
resources.ApplyResources(this.uvPictureBox, "uvPictureBox");
this.uvPictureBox.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
this.uvPictureBox.Name = "uvPictureBox";
this.uvPictureBox.TabStop = false;
//
// buttonImportModel
//
@@ -367,12 +373,12 @@
this.buttonTemplate.UseSelectable = true;
this.buttonTemplate.Click += new System.EventHandler(this.buttonTemplate_Click);
//
// checkTextureGenerate
// generateTextureCheckBox
//
resources.ApplyResources(this.checkTextureGenerate, "checkTextureGenerate");
this.checkTextureGenerate.Name = "checkTextureGenerate";
this.checkTextureGenerate.Theme = MetroFramework.MetroThemeStyle.Dark;
this.checkTextureGenerate.UseSelectable = true;
resources.ApplyResources(this.generateTextureCheckBox, "generateTextureCheckBox");
this.generateTextureCheckBox.Name = "generateTextureCheckBox";
this.generateTextureCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
this.generateTextureCheckBox.UseSelectable = true;
//
// checkGuide
//
@@ -380,7 +386,7 @@
this.checkGuide.Name = "checkGuide";
this.checkGuide.Theme = MetroFramework.MetroThemeStyle.Dark;
this.checkGuide.UseSelectable = true;
this.checkGuide.CheckedChanged += new System.EventHandler(this.render);
this.checkGuide.CheckedChanged += new System.EventHandler(this.Render);
//
// checkBoxArmor
//
@@ -388,7 +394,7 @@
this.checkBoxArmor.Name = "checkBoxArmor";
this.checkBoxArmor.Theme = MetroFramework.MetroThemeStyle.Dark;
this.checkBoxArmor.UseSelectable = true;
this.checkBoxArmor.CheckedChanged += new System.EventHandler(this.render);
this.checkBoxArmor.CheckedChanged += new System.EventHandler(this.Render);
//
// SizeXUpDown
//
@@ -523,7 +529,7 @@
//
// listViewBoxes
//
this.listViewBoxes.Activation = System.Windows.Forms.ItemActivation.OneClick;
this.listViewBoxes.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.listViewBoxes.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.Part,
this.X,
@@ -563,7 +569,7 @@
this.Controls.Add(this.SizeXUpDown);
this.Controls.Add(this.checkBoxArmor);
this.Controls.Add(this.checkGuide);
this.Controls.Add(this.checkTextureGenerate);
this.Controls.Add(this.generateTextureCheckBox);
this.Controls.Add(this.buttonTemplate);
this.Controls.Add(this.displayBox);
this.Controls.Add(this.listViewBoxes);
@@ -571,19 +577,19 @@
this.Controls.Add(this.buttonExportModel);
this.Controls.Add(this.buttonImportModel);
this.Controls.Add(this.buttonEXPORT);
this.Controls.Add(this.labelTextureMappingPreview);
this.Controls.Add(this.texturePreview);
this.Controls.Add(labelTextureMappingPreview);
this.Controls.Add(this.uvPictureBox);
this.Controls.Add(this.comboParent);
this.Controls.Add(this.label6);
this.Controls.Add(label6);
this.Controls.Add(this.buttonIMPORT);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.label7);
this.Controls.Add(label7);
this.Controls.Add(this.rotateLeftBtn);
this.Controls.Add(this.rotateRightBtn);
this.Controls.Add(this.labelView);
this.Controls.Add(this.buttonDone);
this.Controls.Add(this.label3);
this.Controls.Add(this.label5);
this.Controls.Add(label3);
this.Controls.Add(label5);
this.MaximizeBox = false;
this.Name = "generateModel";
this.Style = MetroFramework.MetroColorStyle.Silver;
@@ -597,7 +603,7 @@
this.tabPage1.ResumeLayout(false);
this.myTablePanel2.ResumeLayout(false);
this.myTablePanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.texturePreview)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.uvPictureBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.displayBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.SizeXUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.SizeYUpDown)).EndInit();
@@ -623,15 +629,10 @@
private System.Windows.Forms.Button buttonExportModel;
private System.Windows.Forms.PictureBox displayBox;
private System.Windows.Forms.Button buttonImportModel;
private System.Windows.Forms.Label labelTextureMappingPreview;
private System.Windows.Forms.PictureBox texturePreview;
private PckStudio.PictureBoxWithInterpolationMode uvPictureBox;
private System.Windows.Forms.Button buttonIMPORT;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Button buttonEXPORT;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.ComboBox comboParent;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TabControl tabBody;
private System.Windows.Forms.TabPage tabPage1;
@@ -649,7 +650,7 @@
private System.Windows.Forms.Button rotateRightBtn;
private System.Windows.Forms.Label labelView;
private MetroFramework.Controls.MetroButton buttonTemplate;
private MetroFramework.Controls.MetroCheckBox checkTextureGenerate;
private MetroFramework.Controls.MetroCheckBox generateTextureCheckBox;
private MetroFramework.Controls.MetroCheckBox checkGuide;
private MetroFramework.Controls.MetroCheckBox checkBoxArmor;
private System.Windows.Forms.NumericUpDown SizeXUpDown;

File diff suppressed because it is too large Load Diff

View File

@@ -117,10 +117,177 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label6.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>23, 459</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>38, 13</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>137</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Parent</value>
</data>
<data name="&gt;&gt;label6.Name" xml:space="preserve">
<value>label6</value>
</data>
<data name="&gt;&gt;label6.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label6.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>22</value>
</data>
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label5.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
<value>691, 357</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>44, 13</value>
</data>
<data name="label5.TabIndex" type="System.Int32, mscorlib">
<value>127</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Position</value>
</data>
<data name="&gt;&gt;label5.Name" xml:space="preserve">
<value>label5</value>
</data>
<data name="&gt;&gt;label5.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label5.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>31</value>
</data>
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>691, 259</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>27, 13</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>142</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Size</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;label3.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>30</value>
</data>
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<data name="label7.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label7.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label7.Location" type="System.Drawing.Point, System.Drawing">
<value>654, 236</value>
</data>
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
<value>22, 13</value>
</data>
<data name="label7.TabIndex" type="System.Int32, mscorlib">
<value>131</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>UV</value>
</data>
<data name="&gt;&gt;label7.Name" xml:space="preserve">
<value>label7</value>
</data>
<data name="&gt;&gt;label7.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label7.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label7.ZOrder" xml:space="preserve">
<value>25</value>
</data>
<metadata name="labelTextureMappingPreview.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<data name="labelTextureMappingPreview.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelTextureMappingPreview.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelTextureMappingPreview.Location" type="System.Drawing.Point, System.Drawing">
<value>655, 56</value>
</data>
<data name="labelTextureMappingPreview.Size" type="System.Drawing.Size, System.Drawing">
<value>128, 13</value>
</data>
<data name="labelTextureMappingPreview.TabIndex" type="System.Int32, mscorlib">
<value>113</value>
</data>
<data name="labelTextureMappingPreview.Text" xml:space="preserve">
<value>Texture Mapping Preview</value>
</data>
<data name="&gt;&gt;labelTextureMappingPreview.Name" xml:space="preserve">
<value>labelTextureMappingPreview</value>
</data>
<data name="&gt;&gt;labelTextureMappingPreview.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelTextureMappingPreview.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;labelTextureMappingPreview.ZOrder" xml:space="preserve">
<value>19</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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="createToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
@@ -199,7 +366,6 @@
<data name="&gt;&gt;contextMenuStrip1.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="buttonDone.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
@@ -212,7 +378,6 @@
<data name="buttonDone.Size" type="System.Drawing.Size, System.Drawing">
<value>130, 22</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="buttonDone.TabIndex" type="System.Int32, mscorlib">
<value>111</value>
</data>
@@ -696,36 +861,6 @@
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>24</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label6.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>23, 459</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>38, 13</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>137</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Parent</value>
</data>
<data name="&gt;&gt;label6.Name" xml:space="preserve">
<value>label6</value>
</data>
<data name="&gt;&gt;label6.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label6.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>22</value>
</data>
<data name="comboParent.Items" xml:space="preserve">
<value>HEAD</value>
</data>
@@ -765,66 +900,6 @@
<data name="&gt;&gt;comboParent.ZOrder" xml:space="preserve">
<value>21</value>
</data>
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label5.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
<value>691, 357</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>44, 13</value>
</data>
<data name="label5.TabIndex" type="System.Int32, mscorlib">
<value>127</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Position</value>
</data>
<data name="&gt;&gt;label5.Name" xml:space="preserve">
<value>label5</value>
</data>
<data name="&gt;&gt;label5.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label5.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>31</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>691, 259</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>27, 13</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>142</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Size</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;label3.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>30</value>
</data>
<data name="buttonEXPORT.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
@@ -855,36 +930,6 @@
<data name="&gt;&gt;buttonEXPORT.ZOrder" xml:space="preserve">
<value>18</value>
</data>
<data name="label7.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label7.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label7.Location" type="System.Drawing.Point, System.Drawing">
<value>654, 236</value>
</data>
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
<value>22, 13</value>
</data>
<data name="label7.TabIndex" type="System.Int32, mscorlib">
<value>131</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>UV</value>
</data>
<data name="&gt;&gt;label7.Name" xml:space="preserve">
<value>label7</value>
</data>
<data name="&gt;&gt;label7.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label7.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label7.ZOrder" xml:space="preserve">
<value>25</value>
</data>
<data name="buttonIMPORT.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
@@ -915,63 +960,33 @@
<data name="&gt;&gt;buttonIMPORT.ZOrder" xml:space="preserve">
<value>23</value>
</data>
<data name="texturePreview.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="uvPictureBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="texturePreview.Location" type="System.Drawing.Point, System.Drawing">
<data name="uvPictureBox.Location" type="System.Drawing.Point, System.Drawing">
<value>655, 72</value>
</data>
<data name="texturePreview.Size" type="System.Drawing.Size, System.Drawing">
<data name="uvPictureBox.Size" type="System.Drawing.Size, System.Drawing">
<value>128, 128</value>
</data>
<data name="texturePreview.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<data name="uvPictureBox.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="texturePreview.TabIndex" type="System.Int32, mscorlib">
<data name="uvPictureBox.TabIndex" type="System.Int32, mscorlib">
<value>112</value>
</data>
<data name="&gt;&gt;texturePreview.Name" xml:space="preserve">
<value>texturePreview</value>
<data name="&gt;&gt;uvPictureBox.Name" xml:space="preserve">
<value>uvPictureBox</value>
</data>
<data name="&gt;&gt;texturePreview.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="&gt;&gt;uvPictureBox.Type" xml:space="preserve">
<value>PckStudio.PictureBoxWithInterpolationMode, PCK-Studio, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;texturePreview.Parent" xml:space="preserve">
<data name="&gt;&gt;uvPictureBox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;texturePreview.ZOrder" xml:space="preserve">
<data name="&gt;&gt;uvPictureBox.ZOrder" xml:space="preserve">
<value>20</value>
</data>
<data name="labelTextureMappingPreview.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelTextureMappingPreview.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelTextureMappingPreview.Location" type="System.Drawing.Point, System.Drawing">
<value>655, 56</value>
</data>
<data name="labelTextureMappingPreview.Size" type="System.Drawing.Size, System.Drawing">
<value>128, 13</value>
</data>
<data name="labelTextureMappingPreview.TabIndex" type="System.Int32, mscorlib">
<value>113</value>
</data>
<data name="labelTextureMappingPreview.Text" xml:space="preserve">
<value>Texture Mapping Preview</value>
</data>
<data name="&gt;&gt;labelTextureMappingPreview.Name" xml:space="preserve">
<value>labelTextureMappingPreview</value>
</data>
<data name="&gt;&gt;labelTextureMappingPreview.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelTextureMappingPreview.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;labelTextureMappingPreview.ZOrder" xml:space="preserve">
<value>19</value>
</data>
<data name="buttonImportModel.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
@@ -1113,31 +1128,31 @@
<data name="&gt;&gt;buttonTemplate.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="checkTextureGenerate.AutoSize" type="System.Boolean, mscorlib">
<data name="generateTextureCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkTextureGenerate.Location" type="System.Drawing.Point, System.Drawing">
<data name="generateTextureCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>23, 556</value>
</data>
<data name="checkTextureGenerate.Size" type="System.Drawing.Size, System.Drawing">
<data name="generateTextureCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>140, 15</value>
</data>
<data name="checkTextureGenerate.TabIndex" type="System.Int32, mscorlib">
<data name="generateTextureCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>147</value>
</data>
<data name="checkTextureGenerate.Text" xml:space="preserve">
<data name="generateTextureCheckBox.Text" xml:space="preserve">
<value>Auto Generate Texture</value>
</data>
<data name="&gt;&gt;checkTextureGenerate.Name" xml:space="preserve">
<value>checkTextureGenerate</value>
<data name="&gt;&gt;generateTextureCheckBox.Name" xml:space="preserve">
<value>generateTextureCheckBox</value>
</data>
<data name="&gt;&gt;checkTextureGenerate.Type" xml:space="preserve">
<data name="&gt;&gt;generateTextureCheckBox.Type" xml:space="preserve">
<value>MetroFramework.Controls.MetroCheckBox, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data>
<data name="&gt;&gt;checkTextureGenerate.Parent" xml:space="preserve">
<data name="&gt;&gt;generateTextureCheckBox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;checkTextureGenerate.ZOrder" xml:space="preserve">
<data name="&gt;&gt;generateTextureCheckBox.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="checkGuide.AutoSize" type="System.Boolean, mscorlib">

View File

@@ -74,13 +74,6 @@ namespace PckStudio
labelVersion.Text = $"{Application.ProductName}: {Application.ProductVersion}";
ChangelogRichTextBox.Text = Resources.CHANGELOG;
#if BETA
labelVersion.Text += $"{ApplicationBuildInfo.BetaBuildVersion}@{CommitInfo.BranchName}";
#endif
#if DEBUG
labelVersion.Text += $" (Debug build: {CommitInfo.BranchName}@{CommitInfo.CommitHash})";
#endif
pckFileTypeHandler = new Dictionary<PckFile.FileData.FileType, Action<PckFile.FileData>>(15)
{
[PckFile.FileData.FileType.SkinFile] = HandleSkinFile,
@@ -437,22 +430,22 @@ namespace PckStudio
public void HandleSkinFile(PckFile.FileData file)
{
using (var ms = new MemoryStream(file.Data))
if (file.Properties.HasProperty("BOX"))
{
var texture = Image.FromStream(ms);
if (file.Properties.HasProperty("BOX"))
using generateModel generate = new generateModel(file);
if (generate.ShowDialog() == DialogResult.OK)
{
using generateModel generate = new generateModel(file.Properties, texture);
if (generate.ShowDialog() == DialogResult.OK)
{
entryDataTextBox.Text = entryTypeTextBox.Text = string.Empty;
wasModified = true;
ReloadMetaTreeView();
}
return;
entryDataTextBox.Text = entryTypeTextBox.Text = string.Empty;
wasModified = true;
ReloadMetaTreeView();
}
var skinViewer = new SkinPreview(texture, file.Properties.GetPropertyValue("ANIM", SkinANIM.FromString));
return;
}
using(var ms = new MemoryStream(file.Data))
{
var img = Image.FromStream(ms);
var skinViewer = new SkinPreview(img, file.Properties.GetPropertyValue("ANIM", SkinANIM.FromString));
skinViewer.ShowDialog(this);
skinViewer.Dispose();
}

View File

@@ -1,42 +1,56 @@
using System.Collections.Generic;
using System.Collections;
using System.Collections.Generic;
using System.Windows.Forms;
using OMI.Formats.Pck;
namespace PckStudio
{
public class PckNodeSorter : System.Collections.IComparer, IComparer<TreeNode>
public class PckNodeSorter : IComparer, IComparer<TreeNode>
{
private bool CheckForSkinAndCapeFiles(TreeNode node)
{
if (node.Tag is PckFile.FileData file)
if (IsPckFile(node, out PckFile.FileData file))
return file.Filetype == PckFile.FileData.FileType.SkinFile || file.Filetype == PckFile.FileData.FileType.CapeFile;
return false;
}
private bool IsPckFile(TreeNode node) => IsPckFile(node, out _);
private bool IsPckFile(TreeNode node, out PckFile.FileData file)
{
if (node.Tag is PckFile.FileData _file)
{
return file.Filetype == PckFile.FileData.FileType.SkinFile ||
file.Filetype == PckFile.FileData.FileType.CapeFile;
file = _file;
return true;
}
file = null;
return false;
}
public int Compare(TreeNode first, TreeNode second)
{
// ignore these files in order to preserve skin(and cape) files
if (CheckForSkinAndCapeFiles(first))
{
return 0;
}
if (CheckForSkinAndCapeFiles(second))
{
return 0;
}
if (IsPckFile(first) && !IsPckFile(second))
return -1;
if (!IsPckFile(first) && IsPckFile(second))
return 1;
int result = first.Text.CompareTo(second.Text);
if (result != 0) return result;
return first.ImageIndex.CompareTo(second.ImageIndex);
if (CheckForSkinAndCapeFiles(first))
return -1;
if (CheckForSkinAndCapeFiles(second))
return 1;
return first.Text.CompareTo(second.Text);
// weird fail save
//return first.ImageIndex.CompareTo(second.ImageIndex);
}
int System.Collections.IComparer.Compare(object x, object y)
int IComparer.Compare(object x, object y)
{
return x is TreeNode NodeX && y is TreeNode NodeY ? Compare(NodeX, NodeY) : 0;
if (x is not TreeNode NodeX)
return -1;
if (y is not TreeNode NodeY)
return 1;
return Compare(NodeX, NodeY);
}
}
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="16.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<LangVersion>preview</LangVersion>
@@ -18,45 +18,6 @@
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<Target Name="GetGitInfo" BeforeTargets="WriteGitInfo" Condition="'$(BuildHash)' == ''">
<!-- write hash and branch to console.-->
<Exec Condition="'$(Configuration)' == 'Debug'" Command="git -C $(ProjectDir) describe --always" ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="GitHash" />
</Exec>
<Exec Command="git -C $(ProjectDir) branch --show-current" ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="GitBranch" />
</Exec>
<PropertyGroup>
<BuildHash Condition="'$(Configuration)' == 'Debug'">$(GitHash)</BuildHash>
<BuildBranch>$(GitBranch)</BuildBranch>
</PropertyGroup>
</Target>
<Target Name="WriteGitInfo" BeforeTargets="CoreCompile">
<!-- names the obj/.../GitAssemblyInfo.cs file -->
<PropertyGroup>
<GitAssemblyInfoFile>$(IntermediateOutputPath)GitAssemblyInfo.cs</GitAssemblyInfoFile>
</PropertyGroup>
<!-- includes the GitAssemblyInfo for compilation into your project -->
<ItemGroup>
<Compile Include="$(GitAssemblyInfoFile)" />
</ItemGroup>
<!-- defines the AssemblyMetadata attribute that will be written -->
<ItemGroup>
<AssemblyAttributes Include="AssemblyMetadata" Condition="'$(Configuration)' == 'Debug'">
<_Parameter1>GitHash</_Parameter1>
<_Parameter2>$(BuildHash)</_Parameter2>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyMetadata">
<_Parameter1>GitBranch</_Parameter1>
<_Parameter2>$(BuildBranch)</_Parameter2>
</AssemblyAttributes>
</ItemGroup>
<!-- writes the attribute to the GitAssemblyInfo file -->
<WriteCodeFragment Language="C#" OutputFile="$(GitAssemblyInfoFile)" AssemblyAttributes="@(AssemblyAttributes)" />
</Target>
<Target Name="Delete PDBs" AfterTargets="Build" Condition=" '$(Configuration)' != 'Debug' ">
<Exec Command="del $(OutputPath)*.pdb" />
</Target>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -807,4 +768,57 @@
<Target Name="AfterBuild">
</Target>
-->
<Target Name="GetGitInfo" BeforeTargets="WriteGitInfo" Condition="'$(BuildHash)' == ''">
<!-- write hash and branch to console.-->
<Exec Condition="'$(Configuration)' == 'Debug'" Command="git -C $(ProjectDir) describe --always" ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="GitHash" />
</Exec>
<Exec Command="git -C $(ProjectDir) branch --show-current" ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="GitBranch" />
</Exec>
<PropertyGroup>
<BuildHash Condition="'$(Configuration)' == 'Debug'">$(GitHash)</BuildHash>
<BuildBranch>$(GitBranch)</BuildBranch>
</PropertyGroup>
</Target>
<Target Name="WriteGitInfo" BeforeTargets="CoreCompile">
<!-- names the obj/.../GitAssemblyInfo.cs file -->
<PropertyGroup>
<GitAssemblyInfoFile>$(IntermediateOutputPath)GitAssemblyInfo.cs</GitAssemblyInfoFile>
</PropertyGroup>
<!-- includes the GitAssemblyInfo for compilation into your project -->
<ItemGroup>
<Compile Include="$(GitAssemblyInfoFile)" />
</ItemGroup>
<!-- defines the AssemblyMetadata attribute that will be written -->
<ItemGroup>
<AssemblyAttributes Include="AssemblyMetadata" Condition="'$(Configuration)' == 'Debug'">
<_Parameter1>GitHash</_Parameter1>
<_Parameter2>$(BuildHash)</_Parameter2>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyMetadata">
<_Parameter1>GitBranch</_Parameter1>
<_Parameter2>$(BuildBranch)</_Parameter2>
</AssemblyAttributes>
</ItemGroup>
<!-- writes the attribute to the GitAssemblyInfo file -->
<WriteCodeFragment Language="C#" OutputFile="$(GitAssemblyInfoFile)" AssemblyAttributes="@(AssemblyAttributes)" />
</Target>
<Target Name="Delete PDBs" AfterTargets="Build" Condition=" '$(Configuration)' != 'Debug' ">
<Exec Command="del $(OutputPath)*.pdb" />
</Target>
<Target Name="ZipOutputPath" AfterTargets="Build" Condition="'$(Configuration)' == 'Beta'">
<PropertyGroup>
<StringDate>$([System.DateTime]::Now.ToString('yyyy-MM-dd'))</StringDate>
</PropertyGroup>
<ZipDirectory
SourceDirectory="$(OutputPath)"
DestinationFile="$(OutputPath)\..\$(AssemblyName)_$(Configuration)_$(StringDate).zip"
Overwrite="true" />
</Target>
</Project>

View File

@@ -11,7 +11,7 @@ namespace PckStudio
public static readonly string ProjectUrl = "https://github.com/PhoenixARC/-PCK-Studio";
public static readonly string BaseAPIUrl = "http://api.pckstudio.xyz/api/pck";
public static readonly string BackUpAPIUrl = "https://raw.githubusercontent.com/PhoenixARC/pckstudio.tk/main/studio/PCK/api/";
public static readonly string AppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PCK-Studio");
public static readonly string AppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), Application.ProductName);
public static readonly string AppDataCache = Path.Combine(AppData, "cache");
public static MainForm MainInstance { get; private set; }