Actors - Animation Controllers Module
anvil.api.actors.animation_controllers
The animation controllers of an actor: animation_controllers/<actor>.bp_ac.json in the
behavior pack and animation_controllers/<actor>.rp_ac.json in the resource pack. A
controller is a state machine; each state runs animations and Molang, and moves to another
state when a condition is true.
BPAnimationControllers
Bases: _AnimationControllers[_BPAnimationControllersFile]
The behavior pack animation controllers of an entity.
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 behavior pack animation controllers file of an entity, at export.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
_EntityServerDescription
|
The entity's description, which holds the controllers. |
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 controllers for export, when the actor has any.
RPAnimationControllers
Bases: _AnimationControllers[_RPAnimationControllersFile]
The resource pack animation controllers of an entity or attachable.
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 resource pack animation controllers file of an actor, at export.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
_ActorClientDescription
|
The actor's client description, which holds the controllers. |
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 controllers for export, when the actor has any.