Fast Ref
/
API Reference
/
Core
export_fbx()
지정된 슬롯의 레퍼런스를 FBX 파일 하나로 내보냅니다.
시그니처
api.export_fbx(slot: int, output_path: str, fbx_options: dict = None) -> dict
파라미터
| 파라미터 | 타입 | 설명 |
|---|---|---|
slot |
int |
내보낼 슬롯 번호 (0–9) |
output_path |
str |
출력 .fbx 파일의 절대 경로 |
fbx_options |
dict |
FBX 옵션 (생략 시 현재 기본 프리셋 사용) |
fbx_options는 None이거나 dict여야 합니다. dict를 전달하면 기본 프리셋 위에 해당 키만 덮어씁니다. 나머지 옵션은 기본값을 유지합니다.
반환값
# 성공
{
"success": True,
"message": str,
"output_path": str,
}
# 실패
{
"success": False,
"message": str,
"error": str,
}
예외
| 예외 | 조건 |
|---|---|
ValueError |
슬롯이 유효하지 않거나 비어 있을 때, 출력 경로가 유효하지 않을 때 |
TypeError |
fbx_options가 dict가 아닐 때 |
예제
import sys, os, pymxs
_p = os.path.join(pymxs.runtime.getDir(pymxs.runtime.Name("userScripts")), "os_fast_ref_package")
if _p not in sys.path: sys.path.append(_p)
from os_fast_ref.api import FastRefAPI
api = FastRefAPI()
# 기본 프리셋으로 내보내기
result = api.export_fbx(slot=0, output_path=r"J:\output\character.fbx")
# 특정 옵션만 덮어써서 내보내기
result = api.export_fbx(
slot=0,
output_path=r"J:\output\character_skel.fbx",
fbx_options={"Animation": False, "BakeAnimation": False}
)
if result['success']:
print(f"내보내기 완료: {result['output_path']}")