Actors - Animations Module
anvil.api.actors.animations
The behavior pack's animations/<entity>.animation.json: timelines of commands, events
and Molang an entity runs.
BPAnimations
Bases: JsonFile[_BPAnimationsFile]
The behavior pack animations of an entity, written when it has any. The entity's
description holds them (entity.server.description.animation() adds them); the
file writes them.
Documentation reference
identifier
property
The file's identifier.
name
property
The identifier's name, without its namespace.
__export__()
Exports the addon object after potentially shortening its content and replacing backslashes. Logs the event and writes the object to a file.
__init__(source)
Creates the animations file of an entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
_EntityServerDescription
|
The entity's description, which holds the animations. |
required |
__schema__()
classmethod
The JSON Schema (draft 2020-12) of this file: the schema of its _document_type, with
the file's type as title and where it is written under x-anvil-file.
Raises:
| Type | Description |
|---|---|
TypeError
|
When the class is an abstract file base, with no document type. |
queue(directory=None)
Queues the animations for export, when the entity has any.