klyn.graphics3d.assets.ModelExporter.save
method
public save(asset as ModelAsset, path as FilePath, format as ModelFormat = null, allowLoss as Boolean = false) as ModelExportReport
Description

Writes a model, detecting format by extension unless supplied.

Parameters
ParameterDescription
assetCPU asset to save.
pathOutput file; OBJ writes an adjacent .mtl sidecar.
formatExplicit format, or null to infer it.
allowLossAccepts the losses listed in the returned report.
Returns

ModelExportReport, including all accepted losses.

Throws
  • ModelException For unsupported/ambiguous output or unaccepted loss.
  • IOException For write failures. Example: report = ModelExporter().save(asset, FilePath("robot.obj"), allowLoss=true)