Scene.Save

Save(Stream, FileFormat)

Saves the scene to stream using specified file format.

public void Save(Stream stream, FileFormat format)
ParameterTypeDescription
streamStreamInput stream, user is responsible for closing the stream.
formatFileFormatFormat.

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


Save(Stream, FileFormat, CancellationToken)

Saves the scene to stream using specified file format.

public void Save(Stream stream, FileFormat format, CancellationToken cancellationToken)
ParameterTypeDescription
streamStreamInput stream, user is responsible for closing the stream.
formatFileFormatFormat.
cancellationTokenCancellationTokenCancellation token to the save task

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


Save(Stream, SaveOptions)

Saves the scene to stream using specified file format.

public void Save(Stream stream, SaveOptions options)
ParameterTypeDescription
streamStreamInput stream, user is responsible for closing the stream.
optionsSaveOptionsMore detailed configuration to save the stream.

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


Save(Stream, SaveOptions, CancellationToken)

Saves the scene to stream using specified file format.

public void Save(Stream stream, SaveOptions options, CancellationToken cancellationToken)
ParameterTypeDescription
streamStreamInput stream, user is responsible for closing the stream.
optionsSaveOptionsMore detailed configuration to save the stream.
cancellationTokenCancellationTokenCancellation token to the save task

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


Save(string)

Saves the scene to specified path using specified file format.

public void Save(string fileName)
ParameterTypeDescription
fileNameStringFile name.

Examples

The following code shows how to save scene

Scene scene = Scene.FromFile("input.fbx");
scene.Save("output.usdz");

See Also


Save(string, FileFormat)

Saves the scene to specified path using specified file format.

public void Save(string fileName, FileFormat format)
ParameterTypeDescription
fileNameStringFile name.
formatFileFormatFormat.

Examples

The following code shows how to save scene

Scene scene = Scene.FromFile("input.fbx");
scene.Save("output.usdz", FileFormat.USDZ);

See Also


Save(string, FileFormat, CancellationToken)

Saves the scene to specified path using specified file format.

public void Save(string fileName, FileFormat format, CancellationToken cancellationToken)
ParameterTypeDescription
fileNameStringFile name.
formatFileFormatFormat.
cancellationTokenCancellationTokenCancellation token to the save task

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


Save(string, SaveOptions)

Saves the scene to specified path using specified file format.

public void Save(string fileName, SaveOptions options)
ParameterTypeDescription
fileNameStringFile name.
optionsSaveOptionsMore detailed configuration to save the stream.

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


Save(string, SaveOptions, CancellationToken)

Saves the scene to specified path using specified file format.

public void Save(string fileName, SaveOptions options, CancellationToken cancellationToken)
ParameterTypeDescription
fileNameStringFile name.
optionsSaveOptionsMore detailed configuration to save the stream.
cancellationTokenCancellationTokenCancellation token to the save task

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