Scene
Scene
Bases: BaseModel
Represents a unit of grouped asset references in a timeline.
description
class-attribute
instance-attribute
description: str | None = None
An optional description of the scene.
asset_references
class-attribute
instance-attribute
asset_references: list[AssetReference] = Field(
default_factory=list
)
A list of assets associated with the scene.
from_dict
classmethod
Create a scene from a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
Mapping[str, Any]
|
The dictionary data. |
required |
Returns:
Type | Description |
---|---|
Scene
|
The scene. |
Source code in src/mosaico/scene.py
add_asset_references
add_asset_references(
references: AssetReference | Sequence[AssetReference],
) -> Scene
Add asset references to the scene.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
references |
AssetReference | Sequence[AssetReference]
|
The asset references to add. |
required |
Returns:
Type | Description |
---|---|
Scene
|
The scene. |
Source code in src/mosaico/scene.py
remove_references_by_asset_id
with_subtitle_params
with_subtitle_params(
params: TextAssetParams | Mapping[str, Any]
) -> Scene
Add subtitle asset params to the scene.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
params |
TextAssetParams | Mapping[str, Any]
|
The subtitle asset params. |
required |
Returns:
Type | Description |
---|---|
Scene
|
The scene. |