Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: animating transform with C# named properties are broken by merge bone #1373

Merged
merged 2 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG-PRERELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ The format is based on [Keep a Changelog].

### Fixed
- Prefab overrides on the scene are reverted on first load of the scene at first launch `#1372`
- Animating transform with C# named properties are broken by merge bone `#1373`
- Animator window won't create such animation but some script generates and it works surprisingly

### Security

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ The format is based on [Keep a Changelog].

### Fixed
- Prefab overrides on the scene are reverted on first load of the scene at first launch `#1372`
- Animating transform with C# named properties are broken by merge bone `#1373`
- Animator window won't create such animation but some script generates and it works surprisingly

### Security

Expand Down
3 changes: 3 additions & 0 deletions Editor/Processors/MergePhysBoneProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ private static Vector3 QuaternionToEulerXZY(Quaternion q)
{
"m_LocalRotation.x", "m_LocalRotation.y", "m_LocalRotation.z", "m_LocalRotation.w",
"m_LocalPosition.x", "m_LocalPosition.y", "m_LocalPosition.z" ,
// Animator Window won't create the following properties, but generated by some scripts and works in runtime
"localRotation.x", "localRotation.y", "localRotation.z", "localRotation.w",
"localPosition.x", "localPosition.y", "localPosition.z",
};

sealed class MergePhysBoneMerger : MergePhysBoneEditorModificationUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ bool GameObjectAnimated(Transform transform, BuildContext context)
"m_LocalRotation.x", "m_LocalRotation.y", "m_LocalRotation.z", "m_LocalRotation.w",
"m_LocalPosition.x", "m_LocalPosition.y", "m_LocalPosition.z",
"m_LocalScale.x", "m_LocalScale.y", "m_LocalScale.z",
// Animator Window won't create the following properties, but generated by some scripts and works in runtime
"localRotation.x", "localRotation.y", "localRotation.z", "localRotation.w",
"localPosition.x", "localPosition.y", "localPosition.z",
"localScale.x", "localScale.y", "localScale.z",
"localEulerAnglesRaw.x", "localEulerAnglesRaw.y", "localEulerAnglesRaw.z"
};
}
Expand Down
4 changes: 4 additions & 0 deletions Editor/Processors/TraceAndOptimize/OptimizePhysBone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ private static bool IsAnimatedExternally(VRCPhysBoneBase physBone, AnimationComp
"m_LocalRotation.x", "m_LocalRotation.y", "m_LocalRotation.z", "m_LocalRotation.w",
"m_LocalPosition.x", "m_LocalPosition.y", "m_LocalPosition.z",
"m_LocalScale.x", "m_LocalScale.y", "m_LocalScale.z",
// Animator Window won't create the following properties, but generated by some scripts and works in runtime
"localRotation.x", "localRotation.y", "localRotation.z", "localRotation.w",
"localPosition.x", "localPosition.y", "localPosition.z",
"localScale.x", "localScale.y", "localScale.z",
"localEulerAnglesRaw.x", "localEulerAnglesRaw.y", "localEulerAnglesRaw.z"
};

Expand Down
Loading