Fast Ref API / API Reference / Export

export_abc()

Download Markdown

Exports a single reference slot as an Alembic (.abc) file.

In UE5 this typically becomes a Geometry Cache (vertex bake). Morph data is preserved as vertex animation, not as Skeletal Morph Targets.

Signature

api.export_abc(slot: int, output_path: str, abc_options: dict = None, preset: str = None) -> dict

Parameters

Parameter Type Description
slot int Slot number to export (0 .. MAX_REFERENCE_SLOTS-1, currently up to 20)
output_path str Full path for the output .abc file
abc_options dict Alembic option overrides (applied after preset, or over defaults if no preset)
preset str Saved preset name (e.g. "Unreal_UE5", "Unity_ABC")

If both preset and abc_options are specified, the preset is loaded first and abc_options overrides it.

Return Value

# success
{"success": True, "message": str, "output_path": str}

# failure
{"success": False, "message": str, "error": str}

In Defined Selection Set mode (fbxExportMode == "Defined") with 2+ sets, the core may return an aggregated result (details / success_count, etc.).

Errors

Error Cause
TypeError slot is not int (including bool), or abc_options is not dict
ValueError Slot is invalid or empty, output directory does not exist, invalid preset name

Example

from os_fast_ref.api import FastRefAPI

api = FastRefAPI()
api.refresh()

# Default preset
result = api.export_abc(slot=0, output_path=r"J:\output\character.abc")

# Named preset (UE5 Geometry Cache)
result = api.export_abc(
    slot=0,
    output_path=r"J:\output\char.abc",
    preset="Unreal_UE5",
)

# Meshes only (bones excluded from select; Reset Root still uses full bone list)
result = api.export_abc(
    slot=0,
    output_path=r"J:\output\char_mesh.abc",
    preset="Unreal_UE5",
    abc_options={"ExportMeshes": True, "ExportBones": False},
)

# preset + partial override
result = api.export_abc(
    slot=0,
    output_path=r"J:\output\char.abc",
    preset="Unity_ABC",
    abc_options={"ResetRoot": True, "RemoveNameSpace": True},
)

if result["success"]:
    print(f"Export complete: {result.get('output_path', result.get('message'))}")
else:
    print(f"Export failed: {result.get('error', result.get('message'))}")

💬

Need help with the API?

Open a support ticket or join the community discussion.

Contact Support