SECOND LIFE ANIMATION SUITE FOR BLENDER

Install
1. Blender: Edit > Preferences > Add-ons.
2. Open the add-on menu and choose Install from Disk.
3. Select sl-anim-importer-blender.zip and enable "Second Life ANIM Importer".

Use
3D View > Sidebar > SL Animation
Add > Armature > Create SL/Bento Animation Rig
File > Import > Second Life Animation (.anim)
File > Export > Second Life Animation (.anim)

Independent animation suite
- Fully standalone: Avastar is not imported, bundled, or required. If Avastar is
  installed separately, compatibility is detected from the selected rig only.
- Creates the official 133-joint Bento deform skeleton plus a separate set of
  green animation controls, Origin and COG, and eight arm/leg IK targets/poles.
- Deform bones follow controls but stay hidden and cannot accidentally receive
  animation keys.
- Body, hand, face, wing/tail/hind, IK, and deform visibility groups.
- Continuous IK/FK influence for both arms and legs, target snapping, and a
  pose-preserving IK-to-FK bake.
- Key all/selected controls, reset, mirror, make a static SL pose, and store a
  named pose library inside the armature.
- Create, select, and duplicate Actions; edit SL loop/ease/priority/hand/emote
  settings; assign native per-bone priorities; bulk export Actions.
- Import and export use native ANIM directly and include body, Bento fingers,
  face, wings, tail, groin, and hind limbs.

The importer decodes the native binary directly and writes Blender quaternion
and location F-curves. It does not create a BVH file and does not call Blender's
BVH importer.

Target options
- New official Bento armature: builds the full 133-joint current SL skeleton.
- Active Avastar control rig: recognizes the active Avastar armature and writes
  directly to its green animation controls. Native mPelvis maps to COG. The
  duplicate blue/purple mBone deform skeleton is deliberately never keyed.
- Active armature: creates a new Action on the selected armature and maps joints
  by official SL name or alias. Bone rest matrices are respected, including
  different bone rolls.

The generic Active armature choice also detects Avastar automatically. The
explicit Avastar choice performs an additional compatibility check before any
Action is created. Select the Avastar armature object itself before importing.
If an enabled Avastar IK chain could override imported FK controls, the importer
reports it so the chain can be disabled or baked deliberately.

Native metadata retained on the Action
- priorities and per-joint priorities
- duration, loop points and loop flag
- ease-in and ease-out
- hand pose and emote name
- native IK constraint records
- detected frame cadence and source file details

The optional root heading correction is expressed in degrees around native SL Z.
All quaternion curves use LINEAR interpolation, which Blender normalizes during
pose evaluation and matches Second Life's native nlerp motion model.

Direct native export
- Select the animated official SL/Bento armature and choose the export command.
- The writer samples the Action, reverses the rig's actual bone-rest orientation,
  and writes native ANIM 1.0 data directly. It does not use BVH.
- Actions imported by this add-on automatically restore their SL priorities,
  loop/ease values, hand pose, emote, animated-joint list and constraints.
- When a rest frame was prepended at import, the export range automatically
  begins on the first motion frame so that calibration frame is not uploaded.
- Redundant-key removal is enabled by default and measures quaternion-nlerp and
  position error before native U16 quantization.
- The evaluated final pose is sampled, so Blender constraints and IK results are
  baked into native keys even on affected joints without their own F-curves.
- Export recognizes Avastar automatically and reads the green controls, including
  COG as native mPelvis, instead of sampling its duplicate deform mBones.
