From 911dc7bb47f1cb3f188b059e8de521e8d749144a Mon Sep 17 00:00:00 2001 From: bd_ Date: Tue, 19 Sep 2023 18:29:44 +0900 Subject: [PATCH 1/5] fix: [ESO] bounds are untransformed when root bone is inconsistent (#440) Closes: #439 --- .../nadena.dev.modular-avatar/Editor/EasySetupOutfit.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Packages/nadena.dev.modular-avatar/Editor/EasySetupOutfit.cs b/Packages/nadena.dev.modular-avatar/Editor/EasySetupOutfit.cs index 984a6074..59867034 100644 --- a/Packages/nadena.dev.modular-avatar/Editor/EasySetupOutfit.cs +++ b/Packages/nadena.dev.modular-avatar/Editor/EasySetupOutfit.cs @@ -142,7 +142,7 @@ static void SetupOutfit(MenuCommand cmd) Transform rootBone = null, probeAnchor = null; Bounds bounds = ModularAvatarMeshSettings.DEFAULT_BOUNDS; - FindConsistentSettings(avatarRoot, ref probeAnchor, ref rootBone, ref bounds); + FindConsistentSettings(avatarRoot, avatarHips.transform, ref probeAnchor, ref rootBone, ref bounds); if (probeAnchor == null) { @@ -168,6 +168,7 @@ static void SetupOutfit(MenuCommand cmd) private static void FindConsistentSettings( GameObject avatarRoot, + Transform avatarHips, ref Transform probeAnchor, ref Transform rootBone, ref Bounds bounds @@ -210,8 +211,8 @@ ref Bounds bounds { if (rootBone != skinnedMeshRenderer.rootBone) { - rootBone = null; // inconsistent configuration - bounds = ModularAvatarMeshSettings.DEFAULT_BOUNDS; + rootBone = avatarHips; // inconsistent configuration + bounds = TransformBounds(rootBone, ModularAvatarMeshSettings.DEFAULT_BOUNDS); } else if (Vector3.Distance(bounds.center, skinnedMeshRenderer.bounds.center) > 0.01f || Vector3.Distance(bounds.extents, skinnedMeshRenderer.bounds.extents) > 0.01f) From 4dea8095028edad1d80c19d674c43b2c1c913308 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 00:47:29 +0900 Subject: [PATCH 2/5] chore(deps-dev): bump @tsconfig/docusaurus from 2.0.0 to 2.0.1 in /docs (#438) Bumps [@tsconfig/docusaurus](https://github.com/tsconfig/bases/tree/HEAD/bases) from 2.0.0 to 2.0.1. - [Commits](https://github.com/tsconfig/bases/commits/HEAD/bases) --- updated-dependencies: - dependency-name: "@tsconfig/docusaurus" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/package.json | 2 +- docs/yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/package.json b/docs/package.json index cbdfab88..4276e572 100644 --- a/docs/package.json +++ b/docs/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@docusaurus/module-type-aliases": "2.4.1", - "@tsconfig/docusaurus": "^2.0.0", + "@tsconfig/docusaurus": "^2.0.1", "typescript": "^5.2.2" }, "resolutions": { diff --git a/docs/yarn.lock b/docs/yarn.lock index 67d14da7..c4194909 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -2701,10 +2701,10 @@ __metadata: languageName: node linkType: hard -"@tsconfig/docusaurus@npm:^2.0.0": - version: 2.0.0 - resolution: "@tsconfig/docusaurus@npm:2.0.0" - checksum: 39adca336d9d8d6838c982212e6661c3d211d02244be17861cae4e16b9b5ee9aa0f2d48099649417794b0c2b7661e53905615f94ffb4b5608a326f5b55194e2f +"@tsconfig/docusaurus@npm:^2.0.1": + version: 2.0.1 + resolution: "@tsconfig/docusaurus@npm:2.0.1" + checksum: 63bebda70d83c56f95a90176d2e188e1ea9c08c23b499e5e7b292ebfae0ce7117f712809828ed21ae3b8440daf22191d6bf71bf2575f9bd474a51b1770ca30cc languageName: node linkType: hard @@ -7377,7 +7377,7 @@ __metadata: "@docusaurus/module-type-aliases": 2.4.1 "@docusaurus/preset-classic": ^2.4.1 "@mdx-js/react": ^1.6.22 - "@tsconfig/docusaurus": ^2.0.0 + "@tsconfig/docusaurus": ^2.0.1 clsx: ^2.0.0 prism-react-renderer: ^1.3.5 react: ^17.0.2 From cda95408d5db6d6e19092de15cb91435ef0b55d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 00:47:33 +0900 Subject: [PATCH 3/5] chore(deps): bump @algolia/client-search from 4.19.1 to 4.20.0 in /docs (#437) Bumps [@algolia/client-search](https://github.com/algolia/algoliasearch-client-javascript) from 4.19.1 to 4.20.0. - [Release notes](https://github.com/algolia/algoliasearch-client-javascript/releases) - [Changelog](https://github.com/algolia/algoliasearch-client-javascript/blob/master/CHANGELOG.md) - [Commits](https://github.com/algolia/algoliasearch-client-javascript/compare/4.19.1...4.20.0) --- updated-dependencies: - dependency-name: "@algolia/client-search" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/package.json | 2 +- docs/yarn.lock | 66 +++++++++++++++++++++++------------------------ 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/docs/package.json b/docs/package.json index 4276e572..2371d2d6 100644 --- a/docs/package.json +++ b/docs/package.json @@ -15,7 +15,7 @@ "typecheck": "tsc" }, "dependencies": { - "@algolia/client-search": "^4.19.1", + "@algolia/client-search": "^4.20.0", "@docusaurus/core": "^2.4.1", "@docusaurus/preset-classic": "^2.4.1", "@mdx-js/react": "^1.6.22", diff --git a/docs/yarn.lock b/docs/yarn.lock index c4194909..7bae3f06 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -49,10 +49,10 @@ __metadata: languageName: node linkType: hard -"@algolia/cache-common@npm:4.19.1": - version: 4.19.1 - resolution: "@algolia/cache-common@npm:4.19.1" - checksum: e4e120b9a573235ef401bb40ab1c1e622c618b79b1185fb2d46d6b28c5996297f157fa92afccf1b9e0e74b6792f222832b9a2f0913d5bf389810376b4a5476a4 +"@algolia/cache-common@npm:4.20.0": + version: 4.20.0 + resolution: "@algolia/cache-common@npm:4.20.0" + checksum: a46377de8a309feea109aae1283fc9157c73766a4c51e3085870a1fc49f6e33698814379f3bbdf475713fa0663dace86fc90f0466e64469b1b885a0538abace4 languageName: node linkType: hard @@ -98,13 +98,13 @@ __metadata: languageName: node linkType: hard -"@algolia/client-common@npm:4.19.1": - version: 4.19.1 - resolution: "@algolia/client-common@npm:4.19.1" +"@algolia/client-common@npm:4.20.0": + version: 4.20.0 + resolution: "@algolia/client-common@npm:4.20.0" dependencies: - "@algolia/requester-common": 4.19.1 - "@algolia/transporter": 4.19.1 - checksum: d9d919e026f2918403d78081946fb84c28fb4c5e58a531b5c01c802477b70fa3c6a6d5766dbe924255c213b093459a3c84d14dee3d61338404517203a24496fd + "@algolia/requester-common": 4.20.0 + "@algolia/transporter": 4.20.0 + checksum: 88a27b5f8bba38349e1dbe47634e2ee159a413ff1a3baf6a65fbf244835f8d368e9f0a5ccce8bfe94ec405b38608be5bed45bcb140517f3aba6fe3b7045db373 languageName: node linkType: hard @@ -130,14 +130,14 @@ __metadata: languageName: node linkType: hard -"@algolia/client-search@npm:^4.19.1": - version: 4.19.1 - resolution: "@algolia/client-search@npm:4.19.1" +"@algolia/client-search@npm:^4.20.0": + version: 4.20.0 + resolution: "@algolia/client-search@npm:4.20.0" dependencies: - "@algolia/client-common": 4.19.1 - "@algolia/requester-common": 4.19.1 - "@algolia/transporter": 4.19.1 - checksum: 16f1112bdaba60e0258f8a024f5d90d601c61263faca500a8462fa0c6c767b82dbe5ea4ae616bd9ed41dd27a6c8f233afdb47bdd98e56edcf43c6dcb119079cf + "@algolia/client-common": 4.20.0 + "@algolia/requester-common": 4.20.0 + "@algolia/transporter": 4.20.0 + checksum: 9fb6624dab6753f336f3207ee2af3558baeec4772ef739b6f6ed6a754c366e2e8d62cbf1cf8b28d5f763bec276a0a5fc36db2bf6f53a707890a411afcf550e92 languageName: node linkType: hard @@ -155,10 +155,10 @@ __metadata: languageName: node linkType: hard -"@algolia/logger-common@npm:4.19.1": - version: 4.19.1 - resolution: "@algolia/logger-common@npm:4.19.1" - checksum: 87659bdf11573c3aa44dff573e008ff5c8e3f8968d711ecb131387825779b827c6c5204554acdf1887ba079b8581cb35e519d0550fb1f520ef7d91166df62927 +"@algolia/logger-common@npm:4.20.0": + version: 4.20.0 + resolution: "@algolia/logger-common@npm:4.20.0" + checksum: 06ed28f76b630c8e7597534b15138ab6f71c10dfc6e13f1fb1b76965b39c88fd1d9cb3fe6bb9d046de6533ebcbe5ad92e751bc36fabe98ceda39d1d5f47bb637 languageName: node linkType: hard @@ -187,10 +187,10 @@ __metadata: languageName: node linkType: hard -"@algolia/requester-common@npm:4.19.1": - version: 4.19.1 - resolution: "@algolia/requester-common@npm:4.19.1" - checksum: b6e076021042638149393952ec24f4740dbd09c9896447378cc4b25c8baeab5372653ac037269a6716e05f6920ecd1bb5015aca26c78e68aa32bdd3c103e0d13 +"@algolia/requester-common@npm:4.20.0": + version: 4.20.0 + resolution: "@algolia/requester-common@npm:4.20.0" + checksum: 8580ffd2be146bbdb5d4a57668bba4a5014f406cb2e5c65f596db6babab46c48d30c6e4732034ee1f987970aa27dcdab567959d654fa5fa74c4bcaf98312a724 languageName: node linkType: hard @@ -214,14 +214,14 @@ __metadata: languageName: node linkType: hard -"@algolia/transporter@npm:4.19.1": - version: 4.19.1 - resolution: "@algolia/transporter@npm:4.19.1" +"@algolia/transporter@npm:4.20.0": + version: 4.20.0 + resolution: "@algolia/transporter@npm:4.20.0" dependencies: - "@algolia/cache-common": 4.19.1 - "@algolia/logger-common": 4.19.1 - "@algolia/requester-common": 4.19.1 - checksum: 2835d917c5cbf3c56200a2038a6968327cac44b677a5e351efe1c9bdecb620452ff8c95bf42f0531072dbb9ce3d5c1ea57464a1f4c2cdc1ac4d9e369771d9499 + "@algolia/cache-common": 4.20.0 + "@algolia/logger-common": 4.20.0 + "@algolia/requester-common": 4.20.0 + checksum: f834d5c8fcb7dfa9b7044cb81e9fab44a32f9dd0c3868a0f85fe0de4f4d27ad11fdc9c3c78541bc944c2593f4be56517a8ce593309d062b8a46ca0d6fcb5dcbc languageName: node linkType: hard @@ -7372,7 +7372,7 @@ __metadata: version: 0.0.0-use.local resolution: "modular-avatar-docs@workspace:." dependencies: - "@algolia/client-search": ^4.19.1 + "@algolia/client-search": ^4.20.0 "@docusaurus/core": ^2.4.1 "@docusaurus/module-type-aliases": 2.4.1 "@docusaurus/preset-classic": ^2.4.1 From 7ed0179b915bb16d5177a7042f4dc85ad22429f1 Mon Sep 17 00:00:00 2001 From: bd_ Date: Wed, 20 Sep 2023 18:49:20 +0900 Subject: [PATCH 4/5] fix: null/missing expressions params/menus breaking builds (#441) --- .../FixupPasses/FixupExpressionsMenuPass.cs | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/Packages/nadena.dev.modular-avatar/Editor/FixupPasses/FixupExpressionsMenuPass.cs b/Packages/nadena.dev.modular-avatar/Editor/FixupPasses/FixupExpressionsMenuPass.cs index 29d0fae0..d18ebc13 100644 --- a/Packages/nadena.dev.modular-avatar/Editor/FixupPasses/FixupExpressionsMenuPass.cs +++ b/Packages/nadena.dev.modular-avatar/Editor/FixupPasses/FixupExpressionsMenuPass.cs @@ -6,17 +6,40 @@ using UnityEngine; using UnityEngine.Experimental.Rendering; using VRC.SDK3.Avatars.ScriptableObjects; +using Object = UnityEngine.Object; namespace nadena.dev.modular_avatar.core.editor { internal class FixupExpressionsMenuPass { + private const string DEFAULT_EXP_MENU_GUID = "024fb8ef5b3988c46b446863c92f4522"; + private const string DEFAULT_EXP_PARAM_GUID = "03a6d797deb62f0429471c4e17ea99a7"; + internal static void FixupExpressionsMenu(BuildContext context) { + context.AvatarDescriptor.customExpressions = true; + var expressionsMenu = context.AvatarDescriptor.expressionsMenu; - if (expressionsMenu == null) return; + if (expressionsMenu == null) + { + var defaultExpMenu = AssetDatabase.LoadAssetAtPath( + AssetDatabase.GUIDToAssetPath(DEFAULT_EXP_MENU_GUID) + ); + + expressionsMenu = Object.Instantiate(defaultExpMenu); + context.AvatarDescriptor.expressionsMenu = expressionsMenu; + } + + if (context.AvatarDescriptor.expressionParameters == null) + { + var defaultExpParam = AssetDatabase.LoadAssetAtPath( + AssetDatabase.GUIDToAssetPath(DEFAULT_EXP_PARAM_GUID) + ); + + context.AvatarDescriptor.expressionParameters = Object.Instantiate(defaultExpParam); + } - var parameters = context.AvatarDescriptor.expressionParameters?.parameters + var parameters = context.AvatarDescriptor.expressionParameters.parameters ?? new VRCExpressionParameters.Parameter[0]; var parameterNames = parameters.Select(p=> p.name).ToImmutableHashSet(); From 7edb06279c626efd4d5f54c519a01ea7d291ddfa Mon Sep 17 00:00:00 2001 From: bd_ Date: Wed, 20 Sep 2023 18:52:00 +0900 Subject: [PATCH 5/5] 1.7.7 --- Packages/nadena.dev.modular-avatar/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/nadena.dev.modular-avatar/package.json b/Packages/nadena.dev.modular-avatar/package.json index c5362fb2..5cf9d7ef 100644 --- a/Packages/nadena.dev.modular-avatar/package.json +++ b/Packages/nadena.dev.modular-avatar/package.json @@ -1,7 +1,7 @@ { "name": "nadena.dev.modular-avatar", "displayName": "Modular Avatar", - "version": "1.7.6", + "version": "1.7.7", "unity": "2019.4", "description": "A suite of tools for assembling your avatar out of reusable components", "author": {