Scene constructor
Contents
[
Hide
]init
Initializes a new instance of the Scene class.
def __init__(self):
...
init
Initializes a new instance of the Scene class with an entity attached to a new node.
def __init__(self, entity):
...
| Parameter | Type | Description |
|---|---|---|
| entity | Entity | The initial entity that attached to the scene |
Example
The following code shows how to create a Scene directly from an Entity:
from aspose.threed import Scene
from aspose.threed.entities import Box
scene = Scene(Box())
init
Initializes a new instance of the Scene class and open the file immediately.
This is an obsoleted constructor, please use Scene.from_file.
def __init__(self, file_name):
...
| Parameter | Type | Description |
|---|---|---|
| file_name | str | File’s name to open. |
init
Initializes a new instance of the Scene class as a sub-scene.
def __init__(self, parent_scene, name):
...
| Parameter | Type | Description |
|---|---|---|
| parent_scene | Scene | The parent scene. |
| name | str | Scene’s name. |
See Also
- module
aspose.threed - class
Entity - class
Scene