Skip to content

Detect AAO Merge PhysBone components and reflect in performance calculation#208

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/update-physbone-performance-calculation
Draft

Detect AAO Merge PhysBone components and reflect in performance calculation#208
Copilot wants to merge 2 commits intomasterfrom
copilot/update-physbone-performance-calculation

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Performance calculations ignored AAO MergePhysBone components entirely. PhysBones targeted by MergePhysBone appeared as individual selectable items in the UI, and their merged nature wasn't reflected in component counts.

Changes

  • VRChatAvatar.GetPhysBoneProviders() — Discovers AAO MergePhysBone components via reflection, wraps them as AAOMergePhysBoneProvider, and excludes their target PhysBones from the regular provider list. Falls back to previous behavior when AAO is not installed (AAOMergePhysBoneReflectionInfo.Default == null).

  • AvatarDynamics.CalculatePerformanceStats() (provider overload) — Uses SelectMany(pb.GetPhysBones()) instead of Select(pb.Component as VRCPhysBone) to extract all underlying PhysBones for transform/collider/collision calculations. Overrides PhysBonesCount to count providers, not underlying VRCPhysBones (each MergePhysBone = 1 post-build component).

  • VRChatAvatar.EstimatePerformanceStats() (provider overload) — Calls AvatarDynamics.CalculatePerformanceStats() with providers directly instead of flattening to VRCPhysBone[] first, preserving provider-level grouping for correct component counting.

  • AvatarConverterSettingsEditor — Maps serialized VRCPhysBone[] back to current providers when estimating performance and populating the selector window, so saved configs correctly resolve to MergePhysBone providers.

No double counting

Merged PhysBones are excluded from individual VRCPhysBoneProvider entries by GetPhysBoneProviders(), so SelectMany across all providers produces a disjoint set.

Original prompt

This section details on the original issue you should resolve

<issue_title>アバター内のAAO Merge PhysBoneコンポーネントの検出とパフォーマンス計算への反映</issue_title>
<issue_description>### タスク概要

表題の通り

背景・目的

親Issueの通り。

技術要件

パフォーマンス計算にAAO Merge PhysBoneの存在が考慮されること。
この目的の達成のために、PhysBoneRemoverなどが提供する、残しておくPhysBoneを選択するチェックボックスのリストでは、PhysBone単位ではなくPhysBoneProvider単位で選択できる必要がある。
また、MergePhysBoneの対象となっているPhysBoneはチェックボックスのリストから除外される必要がある。パフォーマンス計算においても重複して計算しないように注意すること。

補足情報

No response

完了条件

ビルドエラーのないこと</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…ation

- VRChatAvatar.GetPhysBoneProviders() now includes AAOMergePhysBoneProviders
  and excludes PhysBones targeted by MergePhysBone
- AvatarDynamics.CalculatePerformanceStats() provider overload now counts
  each provider as 1 PhysBone component (MergePhysBone counts as 1)
- VRChatAvatar.EstimatePerformanceStats() provider overload now calls
  AvatarDynamics provider overload directly for correct counting
- AvatarConverterSettingsEditor maps saved PhysBones to providers correctly

Co-authored-by: kurotu <[email protected]>
Copilot AI changed the title [WIP] Update performance calculation for AAO Merge PhysBone Detect AAO Merge PhysBone components and reflect in performance calculation Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

アバター内のAAO Merge PhysBoneコンポーネントの検出とパフォーマンス計算への反映

2 participants