BaseItem class

BaseItem is the base class for all 3D scene content.

Every BaseItem provides methods and properties that allow you to

Known subtypes

Methods

add(self, obj: BaseItem) -> None

Adds a child to this item.

copy(self) -> BaseItem

Creates a copy of this item.

delete(self) -> None

Irreversibly removes this item from the scene.

delete_children(self) -> None

Deletes all children of this item.

get_property(self, key: str) -> str

Gets a custom property from this object. Returns null if the property can not be found.

get_slot(self, name: str) -> Slot

Returns Slot by name.

on_collision_enter(self, handler: Callable[[t: BaseItem], None]) -> None

Handles the start of a collision between this item and another item.

on_collision_exit(self, handler: Callable[[t: BaseItem], None]) -> None

Handles the end of a collision between this item and another item.

on_property_changed(self, id: str, handler: Callable[[t: str], None]) -> None

Handles property value changes in this object.

remove_from_parent(self) -> None

Removes this item from its parent-item, disconnecting all inherited Transform settings.

set_property(self, key: str, value: object) -> None

Sets a custom property to this object.

Properties

active bool

Defines this item's active state.

readonly animated bool

Returns true if this item has animation tracks.

readonly center Vector3

Returns the center point of this item.

readonly children ItemCollection

Returns all first-level hierarchy children of this item.

color Color

Defines color of this item.

readonly id str

The unique id of this item.

inputobject
name str

Name of this item displayed in their name tag and in the item hierarchy.

name_visible bool

Toggles visibility of the item name tag.

opacity float

Normalized opacity of this item.

readonly parent BaseItem

Returns the parent of this item.

physicsobject
readonly relative_transform Transform

The relative Transform of this item in local space.

speech Union[str, float]

Defines the text in the speech-bubble of this item.

thought Union[str, float]

Defines the text in the thought-bubble of this item.

readonly transform Transform

The Transform of this item in world space.

transitionobject
visible bool

Toggles this item's visibility. If false, items retains its opacity value, but is not displayed.