Scene constructor

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):
    ...
ParameterTypeDescription
entityEntityThe 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):
    ...
ParameterTypeDescription
file_namestrFile’s name to open.

init

Initializes a new instance of the Scene class as a sub-scene.

def __init__(self, parent_scene, name):
    ...
ParameterTypeDescription
parent_sceneSceneThe parent scene.
namestrScene’s name.

See Also