Skip to content

Skel: Slice C — Rest pose authoring #557

@fernandotonon

Description

@fernandotonon

Parent epic: #554
Depends on: Slice A (#555)

Goal

The rest pose (bind pose) is the reference pose that skinning is computed against. Modifying a rig — adding bones, retargeting from another rig, fixing a bad import — frequently requires updating the rest pose. QtMeshEditor today has no surface for this; users have to round-trip through Blender.

Scope

  • Capture current pose as rest pose: when an animated entity is at a specific frame the user likes, snap that pose into the bind pose. Behind the scenes:
    • For each bone, set the new BindingPose TRS to the current evaluated TRS.
    • Recompute the inverse bind matrix per bone.
    • Re-bake every existing animation track so playback still produces the same final world transform (motion is the delta from the new rest, not the old).
    • All in a single undoable SetRestPoseCommand.
  • Reset rest pose: revert to the imported bind pose (we cache it on first load).
  • Edit rest pose mode (toggle): like Blender's Edit Mode for armatures, but specifically for editing the rest TRS. In edit-rest mode, transforming bones with the gizmo updates the rest pose, not animation.
  • Snap selected bones to current pose: like the global capture, but only for selected bones (useful for fixing a single bone without redoing the whole rig).
  • Show / hide rest pose ghost overlay: a translucent rendering of the rest pose alongside the animated pose, for comparison.
  • A-pose / T-pose helpers: heuristic snap "arms horizontal" / "arms 45°" for common humanoid rigs (uses Slice E's left/right naming).
  • Round-trip: glTF + FBX export with the updated bind pose. Verify mesh deformation playback matches in Blender post-export.

Acceptance Criteria

  • Capture-rest-pose on a fixture animation produces a new rest pose where the entity is in the captured pose by default and animations play back identically.
  • Reset-rest-pose returns to the imported bind pose.
  • Edit-rest-pose mode lets the user transform bones without animation playback interfering.
  • Snap-selected works on a subset without disturbing other bones.
  • Ghost overlay clearly distinguishes rest vs current pose.
  • glTF round-trip preserves the new rest pose.
  • All operations undoable.
  • Sentry breadcrumbs scene.skel.rest_pose.*.
  • Headless-CI tests for capture/reset/snap on a 3-bone fixture.

Effort

~7 days. The clip re-baking math is the schedule risk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestskeletonSkeleton & rigging: bones, weights, IK, constraints, envelopes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions