ReadAvatar
ReadDocument. Use the document handle from this session’s ReadDocument() result. The same AvatarInfo is included in DocumentSnapshot.avatar, so you can inspect the document and body at one observation revision.
If the document has no avatar, its snapshot contains a zero avatar handle.
ReadAvatar returns ValidationFailed. Replacing the avatar retires its handle even when the costume document stays open. Discover the replacement through a new snapshot.
MeasurementInfo
Discover IDs and bounds from the current body. Do not infer identifiers from translated labels or assume all avatar models have the same measurements. Compound totals are read-only in 0.3; edit their individual measurements. A height change can alter measurement values and bounds.
Custom models are readable but cannot be resized through this API version. Document protection, frozen avatars, and unsupported parameter state also prevent edits. Stop and reset an active or retained retargeted animation before editing. A session without
EditAvatar receives read-only flags and a permission reason.
SetAvatarMeasurement
SetAvatarMeasurementRequest contains DocumentHandle document, AvatarHandle avatar, Revision expected_revision, std::string measurement_id, and double value_mm.
Requires ReadDocument and EditAvatar. Supply handles and the exact nonzero revision from a current snapshot. The host checks the measurement ID, finite value, current bounds, permissions, and editability before invoking the native measurement adapter.
An accepted change uses one application command. That command captures the body parameters before and after the change, including dependent measurements. Undo restores the captured input; redo restores the captured output without rerunning a script. Values that are unchanged at the host’s float precision return changed = false and create no command.
If the native result cannot be captured safely, the adapter restores the input and returns ValidationFailed. Armorsmith’s existing history manager retains a no-op entry in this exceptional case. Read a fresh snapshot before continuing; the error message explains the restoration.
SetAvatarHeight
SetAvatarHeightRequest contains DocumentHandle document, AvatarHandle avatar, Revision expected_revision, and double height_mm.
The permission and revision rules match measurement edits. The host uses Armorsmith’s existing height and measurement logic, then refreshes bounds, body controls, and rendering. Read the complete avatar snapshot after a successful edit to obtain the resulting proportions and bounds.
