Model
self:set_animation_layer_filter
SharedRestricts an animation layer to a set of bones
Syntax
local status = self:set_animation_layer_filter(
layer,
enabled,
bone_paths,
sync = true
)Parameters
| Type | Name | Description |
|---|---|---|
int | layer | Index of the animation layer to modify |
bool | enabled | Whether the bone filter is active |
table | bone_paths | Optional list of bone paths the layer is limited to |
bool | sync | Whether the call is replicated to other peers |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
core.model.load("character", "models/character.glb")
local entity = core.model.create("character")
entity:set_animation_layer_filter(1, true, {"Skeleton3D:arm_l", "Skeleton3D:arm_r"})
entity:play_animation_layer(1, "wave")core.model.load("character", "models/character.glb")
local entity = core.model.create("character")
entity:set_animation_layer_filter(1, false)