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 |
---|---|---|---|
|
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 |
---|---|---|---|
|
AssetReference | Sequence[AssetReference]
|
The asset references to add. |
required |
Returns:
Type | Description |
---|---|
Scene
|
The scene. |
Source code in src/mosaico/scene.py
remove_asset_id_references
with_subtitle_params
Add subtitle asset params to the scene.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
TextAssetParams | Mapping[str, Any]
|
The subtitle asset params. |
required |
Returns:
Type | Description |
---|---|
Scene
|
The scene. |