Add a public VRCSDK API method for silently invoking the constraint upgrader
available in future release
SenkyDragon
A user may upgrade constraints on their avatar, thinking they've covered everything, but the VRCSDK would miss upgrading any controllers being merged by VRCFury or other non-destructive merging tools.
Please add a public API method that allows us to silently run the upgrader on a given avatar descriptor, so that VRCF can non-destructively ensure the avatar is fully upgraded once any additional controllers have been merged during the upload process.
Log In
This post was marked as
available in future release
This post was marked as
tracked
This post was marked as
available in future release
Dexvoid
We are intending to make ConvertUnityConstraintsToVrChatConstraints() and TryGetSubstituteAnimationBinding() public in the near future.
Please also see https://feedback.vrchat.com/open-beta/p/sdk-370-beta1-please-provide-a-hook-for-supplying-additional-animation-clips-and which has further discussion around injecting a specific set of animation clips to convert.
Dexvoid
Merged in a post:
In SDK 3.7.0-beta.1, AutoFix about constraint does not work
Fuka/フカ
===Google Translated===
In AutoFix, which automatically replaces various Unity constraints with VRC constraints, the description says "rebind avatar animations automatically." However, there is a bug that prevents animation files from being rewritten correctly, and when AutoFix is pressed, the gimmick that controls the constraint with animation will not work.
Currently, many Japanese people use a non-destructive gimmick introduction tool called Modular Avatar to add gimmicks later, but the path of the animation file that ModularAvatar plans to incorporate when uploading is not rewritten, and only the constraint is replaced with VRC Constraint, causing an error in the gimmick.
It is expected that some users will casually push AutoFix, so constraints under ModularAvatar should not be rewritten, or the paths of the animations under its control should also be rewritten.
======
SDK 3.7.0-beta.1でConstraint関連のAutoFixが機能しません
Unityの各種ConstraintからVRC Constraintに自動置き換えするAutoFixにおいて、説明文には"rebind avatar animations automatically."とありますが、アニメーションファイルが正常に書き換えられないバグがあり、AutoFixを押した時点でConstraintをアニメーションで操作するギミックが動作しないようになります。
現在、日本人の多くはModular Avatarという非破壊的なギミック導入ツールを使用してギミックを後から追加しますが、恐らくModularAvatarがアップロード時に組み込む予定のAnimationファイルのパスが書き換えられず、単にConstraintだけがVRC Constraintに置き換えられるため、ギミックにエラーが発生します。
何気なくAutoFixを押してしまうユーザーも想定されるため、ModularAvatar支配下のConstraintは書き換えない、あるいは支配下のアニメーションのパス書き換えも行う必要があります。
bd_
Modular Avatar creator here. If there's a hook provided for this auto fix I can try to provide a set of merged animation clips.
Dexvoid
tracked
Many thanks for highlighting this.
Could I please have a bit more detail about why TryGetSubstituteAnimationBinding() needs to be exposed? This is normally called via ConvertUnityConstraintsToVrChatConstraints(), which handles game objects, and ConvertUnityConstraintTracksToVrChatConstraintTracks(), which handles animation tracks. Would it make sense to expose these two methods with support for skipping the modal confirmation dialog instead? That way, the converter can handle the full process of modifying the affected objects.
I'm open to discussion around this since I'm not aware of the exact needs of VRCFury.
SenkyDragon
Dexvoid Rewriting animation clips in VRCF takes place in an internal "shadow-clip" database rather than operating on the AnimationClip assets directly. I believe MA operates in a similar manner. This is for two reasons:
- AnimationUtility.Set**Curve is /very/ slow, especially when called in bulk, because internally it calls SyncEditorCurves which recalculates the entire editor cache for the clip. By storing bindings in a separate database until the very end, we can limit this sync action to once per AnimationClip which saves a lot of time. However, since this database is not backed by actual AnimationClip assets, we must operate on the bindings directly, and cannot pass an AnimationClip to the VRCSDK.
- This animation database also allows us to detect if a clip has been "changed" or not during the upload process. Changed clips are reserialized out as a new AnimationClip in the vrcfury temp files, while unchanged clips are left pointing to their original assets (saving yet more AnimationClip syncing and serialization).
It's also preferrable that the actions we call should not display a popup or touch the Undo buffer for obvious reasons. ConvertUnityConstraintsToVrChatConstraints (private) and TryGetSubstituteAnimationBinding meet both of these requirements.
SenkyDragon
VRCFury 1.998 is now calling these two methods by reflection.
SenkyDragon
We specifically need access to AvatarDynamicsSetup.ConvertUnityConstraintsToVrChatConstraints (the private one) and AvatarDynamicsSetup.TryGetSubstituteAnimationBinding . If these aren't available in the public SDK at release, we'll have to invoke them through reflection.