Skip to content

Actors - Render Controller Module

anvil.api.actors.render_controller

The resource pack's render_controllers/<actor>.rc.json: what an entity or attachable renders, its geometry, materials and textures.

RenderControllers

Bases: JsonFile[_RenderControllersFile]

The render controllers of an entity or attachable, built at export from its client description, which holds them (render_controller() adds 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 render controllers file of an actor, at export.

Parameters:

Name Type Description Default
source _ActorClientDescription

The actor's client description, which holds the render 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='')

Queues the render controllers for export, when the actor has any.