Avatar context menu: "Refresh Animations" re-fetches and restarts an avatar's playing animations (T-pose fix) #297

Closed
opened 2026-10-04 13:44:05 +00:00 by sky_line · 0 comments
Owner

Add Refresh Animations to the avatar context menus, next to Reset Skeleton / Reset Skeleton And Animations (menu_attachment_other.xml, menu_avatar_other.xml, and the self / attachment-self menus). It fixes the occasional "stuck in T-pose" avatar (also seen in other viewers) without relogging or asking the other person to do anything. Later we can make it automatic.

What it does

For the selected avatar (self, other or animesh), re-request every animation it is currently playing and play it again immediately:

  1. Collect the playing set: the avatar's mPlayingAnimations (from the last AvatarAnimation message, with sequence IDs) plus the motions LLMotionController thinks are active.

  2. Re-fetch the animation assets. Today a failed or stalled fetch can stick:

    • LLKeyframeMotion marks ASSET_FETCH_FAILED (llkeyframemotion.cpp ~527, 608, 619, 2522/2530) and the motion stays dead for the session, leaving bones at the bind pose, i.e. the T-pose;
    • the keyframe data cache can hold a bad entry.

    Clear the failed state and the cached keyframe data for those IDs, and request the assets again through the normal asset path (ViewerAsset cap / CDN).

  3. Restart the motions: stop and start each playing animation on the avatar once its data is ready (stopMotion/startMotion, preserving priority/sequence order), so it plays straight away rather than on the next server update.

  4. Self: the viewer knows its own playing set, so the same works. Optionally also re-send our own animation state to the sim so other viewers get a fresh AvatarAnimation.

Notes

  • This is client-side only; nothing asks the simulator to change anything. If the sim's playing list itself is wrong, only the wearer (or the object playing it) can fix that. The tooltip should say so.
  • Make sure the existing invariant repair in updateCharacter ("restarting playing animation", from the deformer fix) and this share code rather than duplicating it.
  • Log one line per refresh: avatar, count re-fetched, count failed again.

Later (automatic)

Detect the condition (a playing animation whose motion is ASSET_FETCH_FAILED or never activated for more than N seconds while the avatar is visible) and run the same refresh automatically, rate-limited per avatar, with exponential backoff for assets that keep failing.

Add **Refresh Animations** to the avatar context menus, next to *Reset Skeleton* / *Reset Skeleton And Animations* (`menu_attachment_other.xml`, `menu_avatar_other.xml`, and the self / attachment-self menus). It fixes the occasional "stuck in T-pose" avatar (also seen in other viewers) without relogging or asking the other person to do anything. Later we can make it automatic. ### What it does For the selected avatar (self, other or animesh), re-request every animation it is currently playing and play it again immediately: 1. **Collect the playing set:** the avatar's `mPlayingAnimations` (from the last `AvatarAnimation` message, with sequence IDs) plus the motions LLMotionController thinks are active. 2. **Re-fetch the animation assets.** Today a failed or stalled fetch can stick: - `LLKeyframeMotion` marks `ASSET_FETCH_FAILED` (`llkeyframemotion.cpp` ~527, 608, 619, 2522/2530) and the motion stays dead for the session, leaving bones at the bind pose, i.e. the T-pose; - the keyframe data cache can hold a bad entry. Clear the failed state and the cached keyframe data for those IDs, and request the assets again through the normal asset path (ViewerAsset cap / CDN). 3. **Restart the motions:** stop and start each playing animation on the avatar once its data is ready (`stopMotion`/`startMotion`, preserving priority/sequence order), so it plays straight away rather than on the next server update. 4. **Self:** the viewer knows its own playing set, so the same works. Optionally also re-send our own animation state to the sim so other viewers get a fresh `AvatarAnimation`. ### Notes - This is client-side only; nothing asks the simulator to change anything. If the sim's playing list itself is wrong, only the wearer (or the object playing it) can fix that. The tooltip should say so. - Make sure the existing invariant repair in `updateCharacter` ("restarting playing animation", from the deformer fix) and this share code rather than duplicating it. - Log one line per refresh: avatar, count re-fetched, count failed again. ### Later (automatic) Detect the condition (a playing animation whose motion is `ASSET_FETCH_FAILED` or never activated for more than N seconds while the avatar is visible) and run the same refresh automatically, rate-limited per avatar, with exponential backoff for assets that keep failing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#297
No description provided.