Skip to content

Commit

Permalink
Merge branch 'main' into 3dSkinRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
NessieHax committed Aug 22, 2024
2 parents 817c8fa + 62c987e commit f41ff0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions PCK-Studio/Forms/Editor/CustomSkinEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected override bool ProcessDialogKey(Keys keyData)
if (animeditor.ShowDialog() == DialogResult.OK)
{
renderer3D1.ANIM = _skin.Model.ANIM = animeditor.ResultAnim;
DrawDefaultUvAreas(_hightlightDefaultUvAreas);
skinPartListBox_SelectedIndexChanged(this, EventArgs.Empty);
}
return true;
}
Expand Down Expand Up @@ -311,13 +311,11 @@ private void skinPartListBox_SelectedIndexChanged(object sender, EventArgs e)
uvPictureBox.Image = new Bitmap(scaleSize.Width, scaleSize.Height);
using (Graphics g = Graphics.FromImage(uvPictureBox.Image))
{
float lineWidth = ((_skin.Model.Texture.Width / renderer3D1.TextureSize.Width) + (_skin.Model.Texture.Height / renderer3D1.TextureSize.Height)) / 2f;
GraphicsPath graphicsPath = box.GetUVGraphicsPath(new System.Numerics.Vector2(scaleSize.Width * renderer3D1.TillingFactor.X, scaleSize.Height * renderer3D1.TillingFactor.Y));
var brush = new SolidBrush(Color.FromArgb(127, avgColor.GreyScaled()));
g.ApplyConfig(_graphicsConfig);
g.DrawImage(_skin.Model.Texture, new Rectangle(Point.Empty, scaleSize), new Rectangle(Point.Empty, _skin.Model.Texture.Size), GraphicsUnit.Pixel);
g.FillPath(brush, graphicsPath);
//g.DrawPath(new Pen(brush), graphicsPath);
}
uvPictureBox.Invalidate();
}
Expand Down
1 change: 1 addition & 0 deletions PCK-Studio/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1730,6 +1730,7 @@ private bool TrySetLocFile(in LOCFile locFile)
return false;
}

[Obsolete("Refactor or remove this")]
private void importExtractedSkinsFolder(object sender, EventArgs e)
{
OpenFolderDialog contents = new OpenFolderDialog();
Expand Down

0 comments on commit f41ff0a

Please sign in to comment.