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 setFlipCoordinateSystem() and setScale().
SaveOptionsAbstract base for all format-specific save-option objects. Provides setFlipCoordinateSystem() and setAxisSystem().

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(), setRecalculateNormal(), and setContentType().
StlSaveOptionsSave options for STL. Controls setFlipCoordinateSystem(), setAxisSystem(), and setContentType().

glTF Format

ClassDescription
GltfLoadOptionsLoad options for glTF 2.0 and GLB. Key properties: setFlipCoordinateSystem(), setPrettyPrint().
GltfSaveOptionsSave options for glTF 2.0 and GLB. Use setContentType(FileContentType.BINARY) to produce a self-contained .glb package.

FBX Format

ClassDescription
FbxLoadOptionsLoad options for FBX. Key property: setFlipCoordinateSystem().
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();
opts.setContentType(FileContentType.BINARY);
scene.save("output.glb", opts);

See Also