Skip to content

Epic: Skel — Skeletal rigging & control #554

@fernandotonon

Description

@fernandotonon

Overview

QtMeshEditor today supports playing skeletal animation, transforming the whole skeleton (SkeletonTransform::scaleSkeleton/translateSkeleton/rotateSkeleton), dragging bones with auto-key (BoneDragRelease), visualising weights as a heatmap (BoneWeightOverlay), debug-drawing bones (SkeletonDebug), and merging/renaming clips (AnimationMerger, SkeletonTransform::renameAnimation). Phase 5 added the dope sheet and curve editor.

What's not there: any way to actually edit the rig itself. No create/remove/reparent/rename bones. No skin weight painting. No IK authoring. No pose mirroring. No constraints. No envelopes. No rest-pose tools. No bone groups / display layers. No bone-shape customization. No FK/IK switch. None of the everyday tools a rigger reaches for.

This epic closes that gap: turn QtMeshEditor from a skeleton viewer/animator into a skeleton editor/rigger, with the standard rigging vocabulary that Blender, Maya, Houdini, Unity, and Unreal users already know.

GUI + CLI + MCP parity, undo through UndoManager, Sentry breadcrumbs (scene.skel.*), and the slice-PR cadence used by the recent UV (#458), HDR (#466), Lights (#482), Anim (#517), and Paint (#543) epics.

Why

  • Imported rigs are non-editable today. The user can only play what came in. Any tweak — add a tail bone, remove an unused IK target, rename mixamorig:Hips to Hips — requires bouncing through Blender.
  • Skin weights can't be edited or painted. BoneWeightOverlay shows the heatmap but the user can't fix it. AI-assist plans biharmonic auto-weights (AI: libigl bounded biharmonic skinning weights #402) — those will need manual cleanup, which we don't support.
  • No IK authoring means hand-animating arms/legs is the long way. Phase 5 added the curve editor; this slice adds the rigging tools that feed the curve editor with smarter source motion.
  • Pose mirroring (planned in Anim: Slice D — Pose library (named poses, blend, apply, export) #521 Slice D of the Animation epic) needs left/right bone naming conventions and a mirror plane — those belong on the rig, not the pose library.
  • BoneDragRelease already drags bones with auto-key. This epic adds the surrounding rigging context so the drag-and-key flow becomes a proper authoring workflow rather than a single primitive.

Architecture

Builds directly on what's there. No replacements, only extensions:

Reused infrastructure: SkeletonTransform keeps doing skeleton-level TRS; BoneDragRelease keeps its drag-and-keyframe flow; BoneWeightOverlay extends to show active weight under the cursor for the new paint slice; SkeletonDebug becomes the renderer for the new bone shapes; MeshImporterExporter extends to round-trip the new rig metadata (bone groups, constraints where the format supports them, IK metadata into glTF extras).

Every operation is undoable through the existing UndoManager with mergeable commands for slider/drag interactions (mirror TranslateCommand::mergeWith). Every slice ships GUI + CLI + MCP coverage with Sentry breadcrumbs.

Child Issues

Slices A–D are the must-haves the user explicitly asked for (bone CRUD + reparent/attach + weight paint). E–H are the missing-feature must-haves any rigger expects. I is stretch. J brings everything to project conventions.

Acceptance Criteria (epic-level)

  • User can create a new bone (under a parent or root), remove a bone (with optional weight transfer to parent), rename, duplicate.
  • User can reparent bones, detach to root, and attach to an existing entity's skeleton (cross-entity rig sharing).
  • User can edit the bind pose: capture the current pose as the new rest pose, reset to current rest, snap selected bones.
  • User can paint skin weights with a real brush (radius/strength/falloff), normalize, mirror, smooth, lock per-bone.
  • Pose mirroring works with _l/_r, Left*/Right*, and configurable naming conventions; consumed by the Animation epic's pose library (Anim: Slice D — Pose library (named poses, blend, apply, export) #521).
  • User can author a 2-bone IK chain with a pole target; FK ↔ IK switch; bake to keyframes.
  • User can group bones into display layers, hide/show/lock them, recolor them, change display shape per bone.
  • Bone constraints (look-at, copy-rotation, parent-of, limit-rotation) can be authored on a selected bone and evaluated live (coordinated with Anim: Slice H — Constraints (look-at, IK targets, parent-of, copy-rotation) #525).
  • CLI: qtmesh rig add-bone | remove-bone | reparent | rename-bone | paint-weight | mirror-weight | apply-ik.
  • MCP tools: add_bone, remove_bone, reparent_bone, rename_bone, paint_skin_weight, mirror_skin_weight, create_ik_chain, bake_ik_to_fk, set_bone_constraint.
  • Every operation is undoable.
  • Sentry breadcrumbs scene.skel.* per action.
  • No regression in current animation playback, drag-with-auto-key, or weight-overlay paths.
  • CLAUDE.md "Skeletal Rigging" section under Architecture.

Dependencies & related issues

Out of scope

  • Muscle / physics simulation rigs. Soft-body and dynamics out of scope.
  • Spline IK, stretchy chains, ribbon rigs. Future stretch; not in v1.
  • Character "metarig" wizards (Rigify-style auto-generation from a template). Future epic.
  • Cloth / hair / fur rigging. Different domain.
  • Procedural deformers (lattice, wave, bend modifiers). Out of scope.
  • Real-time mocap streaming. Different epic.

Notes for implementers

  • Ogre's Skeleton API has createBone, getBone, but no removeBone — bone deletion has to walk the bone list, rebuild handles, and rewrite affected VertexBoneAssignments in every submesh that references the deleted handle. Plan for this complexity in Slice A.
  • The drag-with-auto-key wiring in BoneDragRelease is the model — every new rig-authoring operation that produces motion should integrate with UndoManager the same way.
  • glTF skeleton round-trip is the bar for Slice A–C. FBX has more surface (constraints, IK metadata) but is lossy in the open-source toolchain.
  • Skin weight paint must reuse Paint v2's BrushEngine (Epic: Paint v2 — Gradients, textured brushes, layers, full PBR painting #543 Slice C blockers permitting). If Paint v2 hasn't shipped Slice C yet when Slice D here is ready, paint a layered prototype off TexturePaintController and migrate when Paint v2 catches up.
  • Constraints + IK evaluate per frame — wire them into the same animation-state evaluation that AnimationControlController drives; do not invent a parallel update loop.
  • Slice cadence + screenshots + Xvfb-safe tests per project convention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    editorenhancementNew feature or requestqtmesh-roadmapskeletonSkeleton & rigging: bones, weights, IK, constraints, envelopes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions