Scene.Save
Save(Stream, FileFormat)
Saves the scene to stream using specified file format.
public void Save(Stream stream, FileFormat format)
Parameter | Type | Description |
---|---|---|
stream | Stream | Input stream, user is responsible for closing the stream. |
format | FileFormat | Format. |
Exceptions
exception | condition |
---|---|
IOException | Thrown when failed at reading input |
ExportException | Thrown when failed to export the scene to specified 3D format |
Examples
The following code shows how to save scene
Scene scene = Scene.FromFile("input.fbx");
using(var ms = new MemoryStream())
{
scene.Save(ms, FileFormat.USDZ);
}
See Also
- class FileFormat
- class Scene
- namespace Aspose.ThreeD
- assembly Aspose.3D
Save(Stream, FileFormat, CancellationToken)
Saves the scene to stream using specified file format.
public void Save(Stream stream, FileFormat format, CancellationToken cancellationToken)
Parameter | Type | Description |
---|---|---|
stream | Stream | Input stream, user is responsible for closing the stream. |
format | FileFormat | Format. |
cancellationToken | CancellationToken | Cancellation token to the save task |
Exceptions
exception | condition |
---|---|
IOException | Thrown when failed at reading input |
ExportException | Thrown when failed to export the scene to specified 3D format |
Examples
The following code shows how to save scene
Scene scene = Scene.FromFile("input.fbx");
var cts = new CancellationTokenSource();
using(var ms = new MemoryStream())
{
scene.Save(ms, FileFormat.USDZ, cts.Token);
}
See Also
- class FileFormat
- class Scene
- namespace Aspose.ThreeD
- assembly Aspose.3D
Save(Stream, SaveOptions)
Saves the scene to stream using specified file format.
public void Save(Stream stream, SaveOptions options)
Parameter | Type | Description |
---|---|---|
stream | Stream | Input stream, user is responsible for closing the stream. |
options | SaveOptions | More detailed configuration to save the stream. |
Exceptions
exception | condition |
---|---|
IOException | Thrown when failed at reading input |
ExportException | Thrown when failed to export the scene to specified 3D format |
Examples
The following code shows how to save scene
Scene scene = Scene.FromFile("input.fbx");
var opt = new UsdSaveOptions();
opt.PrimitiveToMesh = true;
using(var ms = new MemoryStream())
{
scene.Save(ms, opt);
}
See Also
- class SaveOptions
- class Scene
- namespace Aspose.ThreeD
- assembly Aspose.3D
Save(Stream, SaveOptions, CancellationToken)
Saves the scene to stream using specified file format.
public void Save(Stream stream, SaveOptions options, CancellationToken cancellationToken)
Parameter | Type | Description |
---|---|---|
stream | Stream | Input stream, user is responsible for closing the stream. |
options | SaveOptions | More detailed configuration to save the stream. |
cancellationToken | CancellationToken | Cancellation token to the save task |
Exceptions
exception | condition |
---|---|
IOException | Thrown when failed at reading input |
ExportException | Thrown when failed to export the scene to specified 3D format |
Examples
The following code shows how to save scene
Scene scene = Scene.FromFile("input.fbx");
var cts = new CancellationTokenSource();
var opt = new UsdSaveOptions();
opt.PrimitiveToMesh = true;
using(var ms = new MemoryStream())
{
scene.Save(ms, opt, cts.Token);
}
See Also
- class SaveOptions
- class Scene
- namespace Aspose.ThreeD
- assembly Aspose.3D
Save(string)
Saves the scene to specified path using specified file format.
public void Save(string fileName)
Parameter | Type | Description |
---|---|---|
fileName | String | File name. |
Exceptions
exception | condition |
---|---|
IOException | Thrown when failed at reading input |
ExportException | Thrown when failed to export the scene to specified 3D format |
Examples
The following code shows how to save scene
Scene scene = Scene.FromFile("input.fbx");
scene.Save("output.usdz");
See Also
- class Scene
- namespace Aspose.ThreeD
- assembly Aspose.3D
Save(string, FileFormat)
Saves the scene to specified path using specified file format.
public void Save(string fileName, FileFormat format)
Parameter | Type | Description |
---|---|---|
fileName | String | File name. |
format | FileFormat | Format. |
Exceptions
exception | condition |
---|---|
IOException | Thrown when failed at reading input |
ExportException | Thrown when failed to export the scene to specified 3D format |
Examples
The following code shows how to save scene
Scene scene = Scene.FromFile("input.fbx");
scene.Save("output.usdz", FileFormat.USDZ);
See Also
- class FileFormat
- class Scene
- namespace Aspose.ThreeD
- assembly Aspose.3D
Save(string, FileFormat, CancellationToken)
Saves the scene to specified path using specified file format.
public void Save(string fileName, FileFormat format, CancellationToken cancellationToken)
Parameter | Type | Description |
---|---|---|
fileName | String | File name. |
format | FileFormat | Format. |
cancellationToken | CancellationToken | Cancellation token to the save task |
Exceptions
exception | condition |
---|---|
IOException | Thrown when failed at reading input |
ExportException | Thrown when failed to export the scene to specified 3D format |
Examples
The following code shows how to save scene
var cts = new CancellationTokenSource();
Scene scene = Scene.FromFile("input.fbx");
scene.Save("output.usdz", FileFormat.USDZ, cts.Token);
See Also
- class FileFormat
- class Scene
- namespace Aspose.ThreeD
- assembly Aspose.3D
Save(string, SaveOptions)
Saves the scene to specified path using specified file format.
public void Save(string fileName, SaveOptions options)
Parameter | Type | Description |
---|---|---|
fileName | String | File name. |
options | SaveOptions | More detailed configuration to save the stream. |
Exceptions
exception | condition |
---|---|
IOException | Thrown when failed at reading input |
ExportException | Thrown when failed to export the scene to specified 3D format |
Examples
The following code shows how to save scene
var scene = Scene.FromFile("input.fbx");
var opts = new UsdSaveOptions();
opts.PrimitiveToMesh = true;
scene.Save("output.usdz", opts);
See Also
- class SaveOptions
- class Scene
- namespace Aspose.ThreeD
- assembly Aspose.3D
Save(string, SaveOptions, CancellationToken)
Saves the scene to specified path using specified file format.
public void Save(string fileName, SaveOptions options, CancellationToken cancellationToken)
Parameter | Type | Description |
---|---|---|
fileName | String | File name. |
options | SaveOptions | More detailed configuration to save the stream. |
cancellationToken | CancellationToken | Cancellation token to the save task |
Exceptions
exception | condition |
---|---|
IOException | Thrown when failed at reading input |
ExportException | Thrown when failed to export the scene to specified 3D format |
Examples
The following code shows how to save scene
var cts = new CancellationTokenSource();
var scene = Scene.FromFile("input.fbx");
var opts = new UsdSaveOptions();
opts.PrimitiveToMesh = true;
scene.Save("output.usdz", opts, cts.Token);
See Also
- class SaveOptions
- class Scene
- namespace Aspose.ThreeD
- assembly Aspose.3D