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_nodeScene.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__(self) | Initializes a new instance of the Sceneclass. | 
| __init__(self, entity) | Initializes a new instance of the Sceneclass with an entity attached to a new node. | 
| __init__(self, parent_scene, name) | Initializes a new instance of the Sceneclass as a sub-scene. | 
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 AnimationClipdefined 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 Poseused in this scene. | 
| root_node | Gets the root node of the scene. | 
| VERSION | Gets the current release version | 
Methods
| Method | Description | 
|---|---|
| remove_property(self, property) | Removes a dynamic property. | 
| remove_property(self, property) | Remove the specified property identified by name | 
| open(self, stream) | Opens the scene from given stream | 
| open(self, file_name, options) | Opens the scene from given path using specified file format. | 
| open(self, file_name) | Opens the scene from given path | 
| save(self, stream, format) | Saves the scene to stream using specified file format. | 
| save(self, stream, options) | Saves the scene to stream using specified file format. | 
| save(self, file_name) | Saves the scene to specified path using specified file format. | 
| save(self, file_name, format) | Saves the scene to specified path using specified file format. | 
| save(self, file_name, options) | Saves the scene to specified path using specified file format. | 
| render(self, camera, file_name) | Render the scene into external file from given camera’s perspective. The default output size is 1024x768 and output format is png | 
| render(self, camera, file_name, size, format) | Render the scene into external file from given camera’s perspective. | 
| render(self, camera, file_name, size, format, options) | Render the scene into external file from given camera’s perspective. | 
| render(self, camera, bitmap) | Render the scene into bitmap from given camera’s perspective. | 
| render(self, camera, bitmap, options) | Render the scene into bitmap from given camera’s perspective. | 
| get_property(self, property) | Get the value of specified property | 
| set_property(self, property, value) | Sets the value of specified property | 
| find_property(self, property_name) | Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name) | 
| get_animation_clip(self, name) | Gets a named AnimationClip | 
| clear(self) | Clears the scene content and restores the default settings. | 
| create_animation_clip(self, name) | A shorthand function to create and register the AnimationClipThe first AnimationClipwill be assigned to theScene.current_animation_clip | 
| from_file(, file_name) | Opens the scene from given path | 
See Also
- module aspose.threed
- class A3DObject
- class AnimationClip
- class Pose
- class Scene
- class SceneObject