# Keyframe Layers

Keyframe Layers allow you to blend between keyframes/ animation curves. This is very useful when you need to switch between animation states like running and walking. Keyframe Layers allow you to transition between these states without having to copy/paste blocks of animation.&#x20;

### UI

**Active** - enable/disable the layer.

**Strength** - determine the strength of the layer.

**Mode** -&#x20;

* **Normal** - keyframes on the layer are additive.
* **Overwrite** - keyframes on the layer will overwrite other layers.

{% hint style="success" %}
To load the **Strength** animation curve into the [Graph Editor](https://scenegroup.gitbook.io/cavalry/user-interface/menus/window-menu/scene-window/graph-editor), open the **Keyframe Layer Editor** and select the layer you want to adjust.
{% endhint %}

### Examples

![As the Keyframe Layer's Strength increases](https://1676825895-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LT2-S1m8aSPAI_Gg3Q1%2F-LbYIFuHfJGjYe0IP6Pe%2F-LbYlAiahcnQajL21FKJ%2FkeyframeLayers.gif?alt=media\&token=e37bb881-b282-4284-be7f-64da799a772a)

{% hint style="info" %}
Example usage:

1. Open **keyframeLayers\_Start.cv** (Example Files below:point\_down:).
2. At the bottom of the [Scene Window](https://scenegroup.gitbook.io/cavalry/user-interface/menus/window-menu/scene-window) click the **Keyframe Layer Editor** button <img src="https://1676825895-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LT2-S1m8aSPAI_Gg3Q1%2F-LbYIFuHfJGjYe0IP6Pe%2F-LbYfdmnWHLUUe2MV1Hn%2FanimLayer.png?alt=media&#x26;token=b30dc5e7-44e5-4ff3-a600-213a7df41582" alt="" data-size="original">&#x20;
3. Click the + button in the bottom right of the window to create a new **Keyframe Layer**.
4. Double click the new Keyframe Layer to switch to it.
5. Set keys on **armUpper.rotation** of:
   1. fr0 = -50
   2. fr20 = 50
   3. fr40 = -50
6. Set keys on **armLower.rotation** of:
   1. fr6 = 0
   2. fr26 = 40
   3. fr46 = 0
7. Pop into the [Graph Editor](https://scenegroup.gitbook.io/cavalry/user-interface/menus/window-menu/scene-window/graph-editor) to adjust the animation curves.
8. Move the timeline to frame 100.
9. Back in the **Keyframe Layer Editor** set the **Strength** to **0** and set a key.
10. Move the timeline to frame 150.
11. Set **Strength** to a value of **100**.
12. Press play.

The arm's swing height should increase over frames 100 to 150.
{% endhint %}

{% file src="<https://1676825895-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LT2-S1m8aSPAI_Gg3Q1%2F-M9YhHZ9ieJquqfrSsGj%2F-M9YitmhTdVq-Y56eB4j%2FkeyFrameLayers.zip?alt=media&token=dbe28006-562a-4251-abaa-df61a94552e8>" %}
Example Files
{% endfile %}
