> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinemation.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# 🦾Rig

> In this section you will learn about the character skeleton.

## Kinemation Rig

The **Scriptable Animation System** introduces a new way of storing the information about the character skeleton hierarchy - Rig Assets.

**Rig Asset** is a Scriptable Object, which contains:

* Character Skeleton hierarchy

* Element Chains

* Animation Curves

To create a new **Rig Asset Right click -> KINEMATION -> Rig:**

<Frame caption={"Rig Asset."}>
  <img src="https://mintcdn.com/kinemation/IMbHDDWE_rjJU7jO/images/scriptable-animation-system/e67e7553f8e9df014074.png?fit=max&auto=format&n=IMbHDDWE_rjJU7jO&q=85&s=202b3737ba584b88e61c2504dc1b03c4" alt="" width={397} data-path="images/scriptable-animation-system/e67e7553f8e9df014074.png" />
</Frame>

In order to update the character skeleton hierarchy, it's required to provide a **K Rig Component** reference. To do this, attach the **K Rig Component** to the root bone of the skeleton hierarchy:

<img src="https://mintcdn.com/kinemation/IMbHDDWE_rjJU7jO/images/scriptable-animation-system/8037349928b5be26d1e5.png?fit=max&auto=format&n=IMbHDDWE_rjJU7jO&q=85&s=d6e2275d583b9f1a2d267bb978de3afd" alt="" width={257} data-path="images/scriptable-animation-system/8037349928b5be26d1e5.png" />

**Rig Component** will iterate over all child transforms of the root bone and include them in the hierarchy collection. Then, you you will need to specify the **Rig Component** reference in your desired **Rig Asset** and hit the *Import Rig* button/

The **Rig Asset** does not store the Transform references, instead, it has a List of **KRigElements** - a struct which has a name and an **index** of the element in the hierarchy.

Then, you can retrive the Transform reference based on the **KRigElement**:

Thanks to this system we can select bones we want to modify in the data assets without holding a reference to the bone!

## Practical Example

The Rig Asset has another cool feature - automated bone selection. If you want to select a bone from the pop-up window in your custom script, make sure to implement the **IRigUser** interface:

The only method this interface provides is GetRigAsset - it will be used by a custom drawer to select a rig element.

Now, simply add a KRigElement to your script:

Now when you get back to the Editor, you will be able to select an element from the hierarchy. This concept is used for **Animator Layer Settings** and other entities in the framework.

And in the next section we will learn about the new layer system!

## KRigElement

This struct represents the element in the hierarchy:

**Rig Elements** are visually represented as selectable widgets in Rig Asset, Animator Layers and other scripts:

<Frame caption={"Rig elements."}>
  <img src="https://mintcdn.com/kinemation/IMbHDDWE_rjJU7jO/images/scriptable-animation-system/e37a4204ef8f9d86013a.png?fit=max&auto=format&n=IMbHDDWE_rjJU7jO&q=85&s=1144ec3e35821c9c8a943541040ec58d" alt="" width={338} data-path="images/scriptable-animation-system/e37a4204ef8f9d86013a.png" />
</Frame>

The **Rig Element** does not represent the Transform itself, so you need to re-trieve the Transform reference via the **Rig Component**:

When you select an element in the editor, the system caches the index in the hierearchy automatically. However, it is also possible to get a Transform reference by a string name only:

<Tip>
  **Tip:** Transforms re-trieved via the Rig Component are always valid, unless the index is inentionally changed in the constructor. If the Rig Element is empty, the Rig Component will return a reference to the root bone.
</Tip>

## KPose

**KPose** is a struct that represents an element pose in the **Kinemation Rig**. Let's see what fields it has:

The KPose has many applications, like pose caching, blending and a convenient pose offset. For example, it is very convenient for bone modifications:
