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

NameTypeAccessDescription
root_node``ReadGets the root node.
sub_scenesList['Scene']ReadGets the sub scenes.
libraryList[CustomObject]ReadGets the library.
asset_infoAssetInfoReadGets the asset info.
animation_clipsList['AnimationClip']ReadGets the animation clips.
current_animation_clipOptional['AnimationClip']ReadGets the current animation clip.
posesListReadGets the poses.

Methods

SignatureDescription
__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

See Also