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 12 methods for working with Scene objects in Python programs. Available methods include: __init__, clear, create_animation_clip, find_property, from_file, get_animation_clip, get_property, open, remove_property, render, save, set_property. All public 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, name, poses, and 4 more.

Properties

NameTypeAccessDescription
root_node``ReadGets the root node.
sub_scenesList['Scene']ReadGets the sub scenes.
libraryList[CustomObject]ReadGets the library.
asset_infoAssetInfoRead/WriteGets or sets the asset info.
animation_clipsList['AnimationClip']ReadGets the animation clips.
current_animation_clipOptional['AnimationClip']Read/WriteGets or sets the current animation clip.
posesListReadGets the poses.
scene``Read/WriteGets or sets the scene.
namestrRead/WriteGets or sets the name.
propertiesPropertyCollectionReadGets the properties.

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
find_property(property_name: str)
get_property(property: str)
set_property(property: str, value)Sets the property value.
remove_property(property)

See Also

 English