Scene class
Scene class
A scene is a top-level object that contains the nodes, geometries, materials, textures, animation, poses, sub-scenes and etc.
Scene can have sub-scenes, acts as multiple-document support in files like collada/blender/fbx
Node hierarchy can be accessed through Scene.root_node
Scene.library
is used to keep a reference of unattached objects during serialization(like meta data or custom objects) so it can be used as a library.
Inheritance: Scene
→
SceneObject
→
A3DObject
The Scene type exposes the following members:
Constructors
Constructor | Description |
---|---|
init | Initializes a new instance of the Scene class. |
init | Initializes a new instance of the Scene class with an entity attached to a new node. |
init | Initializes a new instance of the Scene class as a sub-scene. |
init | Initializes a new instance of the Scene class and open the file immediately.This is an obsoleted constructor, please use Scene.from_file . |
Properties
Property | Description |
---|---|
name | Gets or sets the name. |
properties | Gets the collection of all properties. |
scene | Gets the scene that this object belongs to |
sub_scenes | Gets all sub-scenes |
library | Objects that not directly used in scene hierarchy can be defined in Library. This is useful when you’re using sub-scenes and put reusable components under sub-scenes. |
animation_clips | Gets all AnimationClip defined in the scene. |
current_animation_clip | Gets or sets the active AnimationClip |
asset_info | Gets or sets the top-level asset information |
poses | Gets all Pose used in this scene. |
root_node | Gets the root node of the scene. |
Methods
Method | Description |
---|---|
remove_property | Removes a dynamic property. |
remove_property | Remove the specified property identified by name |
open | Opens the scene from given stream |
open | Opens the scene from given path using specified file format. |
open | Opens the scene from given path |
save | Saves the scene to stream using specified file format. |
save | Saves the scene to stream using specified file format. |
save | Saves the scene to specified path using specified file format. |
save | Saves the scene to specified path using specified file format. |
save | Saves the scene to specified path using specified file format. |
render | Render the scene into external file from given camera’s perspective. The default output size is 1024x768 and output format is png |
render | Render the scene into external file from given camera’s perspective. |
render | Render the scene into external file from given camera’s perspective. |
render | Render the scene into bitmap from given camera’s perspective. |
render | Render the scene into bitmap from given camera’s perspective. |
get_property | Get the value of specified property |
set_property | Sets the value of specified property |
find_property | Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name) |
get_animation_clip | Gets a named AnimationClip |
clear | Clears the scene content and restores the default settings. |
create_animation_clip | A shorthand function to create and register the AnimationClip The first AnimationClip will be assigned to the Scene.current_animation_clip |
from_file | Opens the scene from given path |
See Also
- module
aspose.threed
- class
A3DObject
- class
AnimationClip
- class
Pose
- class
Scene
- class
SceneObject