save method

save

Saves the scene to specified path using specified file format.

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

Example

The following code shows how to save scene

from aspose.threed import Scene

scene = Scene.from_file("input.fbx")
scene.save("output.usdz")

save

Saves the scene to stream using specified file format.

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

Example

The following code shows how to save scene

from aspose.threed import FileFormat, Scene
from io import BytesIO

scene = Scene.from_file("input.fbx")
with BytesIO() as ms:
    scene.save(ms, FileFormat.USDZ)

save

Saves the scene to stream using specified file format.

def save(self, stream, options):
    ...
ParameterTypeDescription
streamio.RawIOBaseInput stream, user is responsible for closing the stream.
optionsaspose.threed.formats.SaveOptionsMore detailed configuration to save the stream.

Example

The following code shows how to save scene

from aspose.threed import Scene
from aspose.threed.formats import UsdSaveOptions
from io import BytesIO

scene = Scene.from_file("input.fbx")
opt = UsdSaveOptions()
opt.primitive_to_mesh = True
with BytesIO() as ms:
    scene.save(ms, opt)

save

Saves the scene to specified path using specified file format.

def save(self, file_name, format):
    ...
ParameterTypeDescription
file_namestrFile name.
formatFileFormatFormat.

Example

The following code shows how to save scene

from aspose.threed import FileFormat, Scene

scene = Scene.from_file("input.fbx")
scene.save("output.usdz", FileFormat.USDZ)

save

Saves the scene to specified path using specified file format.

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

Example

The following code shows how to save scene

from aspose.threed import Scene
from aspose.threed.formats import UsdSaveOptions

scene = Scene.from_file("input.fbx")
opts = UsdSaveOptions()
opts.primitive_to_mesh = True
scene.save("output.usdz", opts)

See Also