Load and Save Options — Aspose.3D FOSS for Java

Overview

Load and save options are passed to Scene.open() (load) or Scene.save() (save) to control format-specific behaviour such as axis flipping, scale, coordinate conventions, and binary vs. ASCII output.

Package: com.aspose.threed

All option classes inherit from LoadOptions or SaveOptions.


Base Classes

ClassDescription
LoadOptionsAbstract base for all format-specific load-option objects. Provides setFileName(), setEncoding(), and setFileSystem().
SaveOptionsAbstract base for all format-specific save-option objects. Provides setFileName(), setEncoding(), and setExportTextures().

OBJ Format

ClassDescription
ObjLoadOptionsLoad options for Wavefront OBJ. Key properties: setFlipCoordinateSystem(), setScale(), setEnableMaterials(), setNormalizeNormal().
ObjSaveOptionsSave options for Wavefront OBJ. Controls normals, UVs, material references, and point-cloud mode.

STL Format

ClassDescription
StlLoadOptionsLoad options for STL. Supports setFlipCoordinateSystem() and setRecalculateNormal().
StlSaveOptionsSave options for STL. Controls setFlipCoordinateSystem() and setAxisSystem(). Pass a FileContentType to the constructor to select binary or ASCII output.

glTF Format

ClassDescription
GltfLoadOptionsLoad options for glTF 2.0 and GLB. Key property: setFlipTexCoordV().
GltfSaveOptionsSave options for glTF 2.0 and GLB. Pass FileContentType.BINARY to the constructor to produce a self-contained .glb package.

FBX Format

ClassDescription
FbxLoadOptionsLoad options for FBX. Key property: setKeepBuiltinGlobalSettings().
FbxSaveOptionsSave options for FBX.

Quick Example

import com.aspose.threed.Scene;
import com.aspose.threed.GltfSaveOptions;
import com.aspose.threed.FileContentType;

Scene scene = Scene.fromFile("model.obj");

// Save as binary GLB
GltfSaveOptions opts = new GltfSaveOptions(FileContentType.BINARY);
scene.save("output.glb", opts);

See Also

 English