Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [7.0.2] - 2022-07-21
### Changed
- Internal code clean up.
  • Loading branch information
Unity Technologies committed Jul 21, 2022
1 parent d25cff7 commit 6a365bb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 42 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Changelog

## [7.0.2] - 2022-07-21
### Changed
- Internal code clean up.

## [7.0.1] - 2022-05-20
### Fixed
- Fixed Sprite missing reference on certain source file created by third party tools. (Case DANB-35)

## [8.0.0-pre.1] - 2022-03-21
###Fixed
### Fixed
- Allow multi editing for PSDImporter Settings tab. (Case 1400534)
- Fixed import not importing when Apply is clicked on Inspector.

Expand Down
32 changes: 0 additions & 32 deletions Editor/PSDImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -480,38 +480,6 @@ TextureGenerationOutput ImportTexture(AssetImportContext ctx, NativeArray<Color3
return output;
}

void AutoGenerateSpriteSkinData(SpriteMetaData metaData)
{
//If bone data exist but skinning data doesn't exist, auto generate them
if (metaData.spriteBone != null && metaData.spriteBone.Count > 0 &&
(metaData.vertices == null || metaData.vertices.Count == 0))
{
var spriteMeshDataController = new SpriteMeshDataController();
var smd = new SpriteMeshData();
smd.spriteID = metaData.spriteID;
smd.frame = metaData.rect;
smd.pivot = metaData.pivot;
smd.bones = ModuleUtility.CreateSpriteBoneData(metaData.spriteBone.ToArray(), Matrix4x4.TRS(metaData.rect.position, Quaternion.identity, Vector3.one));
spriteMeshDataController.spriteMeshData = smd;
spriteMeshDataController.OutlineFromAlpha(new OutlineGenerator(), GetDataProvider<ITextureDataProvider>(), 0.05f, 200);
spriteMeshDataController.Triangulate(new Triangulator());
spriteMeshDataController.Subdivide(new Triangulator(), 0.25f, 0);
spriteMeshDataController.CalculateWeights(new BoundedBiharmonicWeightsGenerator(), null, 0.01f);
spriteMeshDataController.SortTrianglesByDepth();

List<Vertex2DMetaData> vmd = new List<Vertex2DMetaData>(smd.vertices.Count);
foreach (var v in smd.vertices)
vmd.Add(new Vertex2DMetaData() { position = v.position - smd.frame.position, boneWeight = v.editableBoneWeight.ToBoneWeight(true) });
List<Vector2Int> emd = new List<Vector2Int>(smd.edges.Count);
foreach (var e in smd.edges)
emd.Add(new Vector2Int(e.index1, e.index2));

metaData.vertices = vmd;
metaData.indices = smd.indices.ToArray();
metaData.edges = emd.ToArray();
}
}

string GetUniqueSpriteName(string name, UniqueNameGenerator generator)
{
if (m_KeepDupilcateSpriteName)
Expand Down
15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.unity.2d.psdimporter",
"version": "7.0.1",
"version": "7.0.2",
"unity": "2022.1",
"displayName": "2D PSD Importer",
"description": "A ScriptedImporter for importing Adobe Photoshop PSB (Photoshop Big) file format. The ScriptedImporter is currently targeted for users who wants to create multi Sprite character animation using Unity 2D Animation Package.",
Expand All @@ -11,22 +11,19 @@
],
"category": "2D",
"dependencies": {
"com.unity.2d.animation": "8.0.2",
"com.unity.2d.common": "7.0.0",
"com.unity.2d.animation": "8.0.3",
"com.unity.2d.common": "7.0.1",
"com.unity.2d.sprite": "1.0.0"
},
"relatedPackages": {
"com.unity.2d.psdimporter.tests": "7.0.1"
},
"_upm": {
"changelog": "### Fixed\n- Fixed Sprite missing reference on certain source file created by third party tools. (Case DANB-35)"
"com.unity.2d.psdimporter.tests": "7.0.2"
},
"upmCi": {
"footprint": "cc3fd8adba7f82713f6f6c7be7445e656847185f"
"footprint": "d6a1d4046606be249077a8ad9890b5aee1a2340e"
},
"repository": {
"url": "https://github.cds.internal.unity3d.com/unity/2d.git",
"type": "git",
"revision": "421f1d59ab6046bc479d37c693ea86dd295a35aa"
"revision": "a6e7a338cb041acdfac2a45c68b95cdd9d84e384"
}
}

0 comments on commit 6a365bb

Please sign in to comment.