open method

open

Opens the scene from given stream

def open(self, stream):
    ...
ParameterTypeDescription
streamio.RawIOBaseInput stream, user is responsible for closing the stream.

Example

The following code shows how to open a scene from stream

from aspose.threed import Scene

scene = Scene()
with open("input.fbx", "rb") as stream:
    scene.open(stream)

open

Opens the scene from given path

def open(self, file_name):
    ...
ParameterTypeDescription
file_namestrFile name.

Example

The following code shows how to open a scene from file name

from aspose.threed import Scene

scene = Scene()
scene.open("input.fbx")

open

Opens the scene from given path using specified file format.

def open(self, file_name, options):
    ...
ParameterTypeDescription
file_namestrFile name.
optionsaspose.threed.formats.LoadOptionsMore detailed configuration to open the stream.

Example

The following code shows how to open a scene from file name with extra load options

from aspose.threed import Scene
from aspose.threed.formats import FbxLoadOptions

scene = Scene()
opts = FbxLoadOptions()
opts.lookup_paths.append("textures")
scene.open("input.fbx", opts)

See Also