Skip to content
weSkelDOCUMENTATION
Documentation/Animation/Switch FK/IK

Pose continuity

Switch FK/IK

Switch between FK and IK on Arm and Leg while preserving the selected limb pose as closely as possible.

ArmLegFK / IK

In Maya, select one or more controllers from the same limb and side, then run:

from weSkel.src.tools.animation import switch_fk_ik
result = switch_fk_ik()

Controller shapes are accepted. An empty or mixed selection, or a shared center controller, does not identify a limb. The module must have both FK and IK. The switcher works on its current pose without building or rebuilding.

An exact match switches immediately. Otherwise the viewport shows a proposal and the dialog reports position, orientation and scale/shear errors. Accept Approximation applies it; Cancel restores the pose without a key or Undo entry. An applied switch is one Undo operation, with Redo of the same operation.

Animation state Switch effect
Auto Key OFF Values at the current frame; no keys are added or edited. Time reevaluation may restore values from existing curves.
Auto Key ON, already animated channel Changed, keyable channels receive a key or update the current frame’s key.
Auto Key ON, channel without a curve The value changes; no curve is initialized automatically.

A picker can retain an explicit target independently of names and current selection:

from weSkel.src.tools.animation import resolve_fk_ik_target, switch_fk_ik
# Capture once from a selected limb; retain the root UUID and side.
target = resolve_fk_ik_target().target
# The picker can invoke this later without changing Maya selection.
result = switch_fk_ik(target)

The serializable contract is FkIkTarget(instance_id, side): module root UUID and side l or r. The service resolves these identities again on every call; do not retain wrappers or a prepared proposal between frames.

result.applied indicates whether the pose was applied; result.report.exact distinguishes an exact match from an accepted approximation.

In batch mode, an approximation is canceled by default. The optional confirm_approximation(report) parameter must return an explicit boolean and remain strictly read-only during the preview. Animation layers, character sets, proxies, unsupported connections, playback and protected channels cause an explicit refusal.

For this tool, open a new Maya session after changing code or checkout and check weSkel.__file__: the undoable runtime may already be loaded.