Fast Ref / API Reference / Export

지정된 슬롯의 레퍼런스를 FBX 파일 하나로 내보냅니다.

시그니처

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

파라미터

파라미터 타입 설명
slot int 내보낼 슬롯 번호 (0-9)
output_path str 출력 .fbx 파일의 절대 경로
fbx_options dict FBX 옵션 오버라이드 (생략 시 preset 또는 기본 프리셋 사용)
preset str 사용할 프리셋 이름 (예: "Unreal", "Unreal_Ani") [v2 신규]

presetfbx_options를 동시에 지정하면, preset을 먼저 로드한 뒤 fbx_options로 덮어씁니다.

반환값

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

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

예외

예외 조건
TypeError slot이 int가 아닐 때 (bool 포함) [v2 추가]
ValueError 슬롯이 유효하지 않거나 비어 있을 때, 출력 경로 디렉토리 없을 때, 없는 preset 이름
TypeError fbx_optionsdict가 아닐 때

예제

from os_fast_ref.api import FastRefAPI

api = FastRefAPI()

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

# Named preset (v2)
result = api.export_fbx(slot=0, output_path=r"J:\output\char.fbx", preset="Unreal_Ani")

# Override specific options only
result = api.export_fbx(
    slot=0,
    output_path=r"J:\output\character_skel.fbx",
    fbx_options={"Animation": False, "BakeAnimation": False}
)

# preset + partial override (v2)
result = api.export_fbx(
    slot=0,
    output_path=r"J:\output\char.fbx",
    preset="Unreal_Ani",
    fbx_options={"BakeAnimation": False}
)

if result['success']:
    print(f"Export complete: {result['output_path']}")

💬

Need help with the API?

Open a support ticket or join the community discussion.

문의하기