Scene
Overview
Scene is a class in Aspose.3D FOSS for Python.
Inherits from: SceneObject.
Scene.clear removes all nodes, assets, and animation data from the scene.
This class provides 8 methods for working with Scene objects in Python programs.
Available methods include: __init__, clear, create_animation_clip, from_file, get_animation_clip, open, render, save.
All exported members are accessible to any Python application after installing the Aspose.3D FOSS for Python package.
Properties: animation_clips, asset_info, current_animation_clip, library, poses, root_node, and 1 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
root_node | `` | Read | Gets the root node. |
sub_scenes | List['Scene'] | Read | Gets the sub scenes. |
library | List[CustomObject] | Read | Gets the library. |
asset_info | AssetInfo | Read | Gets the asset info. |
animation_clips | List['AnimationClip'] | Read | Gets the animation clips. |
current_animation_clip | Optional['AnimationClip'] | Read | Gets the current animation clip. |
poses | List | Read | Gets the poses. |
Methods
| Signature | Description |
|---|---|
__init__(entity: Optional[Entity], parent_scene, name: Optional[str]) | |
clear() | Removes all nodes, assets, and animation data from the scene |
create_animation_clip(name: str) → 'AnimationClip' | Creates a new AnimationClip with the given name and adds it to the scene |
get_animation_clip(name: str) → Optional['AnimationClip'] | Returns the AnimationClip with the specified name or None if not found |
open(file_or_stream, options) | Loads a scene from a file path or stream using the provided load options |
save(file_or_stream, format_or_options) | Writes the scene to a file path or stream using the given format or save options |
render(camera, file_name_or_bitmap, size, format, options) | Not implemented in the FOSS edition — throws at runtime. Renders the scene from the given camera to an image file, bitmap, or buffer with specified size and format |
from_file(file_name: str) | Is a convenience constructor that creates a Scene by loading the specified file |