Fast Ref / API Reference / Manage

replace_reference()

마크다운 다운로드

지정된 슬롯의 레퍼런스를 새 파일로 교체합니다. 애니메이션, 컨스트레인 백업 및 복원이 자동으로 처리됩니다.

시그니처

api.replace_reference(slot: int, new_file: str) -> dict

파라미터

파라미터 타입 설명
slot int 교체할 슬롯 번호 (0-9)
new_file str .max 파일의 절대 경로

반환값

{
    "success": True,
    "message": str,
    "slot": int,
}

예외

예외 조건
TypeError slot이 int가 아닐 때 (bool 포함) [v2 추가]
FileNotFoundError 파일이 디스크에 존재하지 않을 때
ValueError 슬롯이 유효하지 않거나 비어 있을 때

예제

from os_fast_ref.api import FastRefAPI

api = FastRefAPI()
result = api.replace_reference(slot=0, new_file=r"J:\assets\char_v2.max")
print(result['message'])

v2: 확인 다이얼로그 없이 자동으로 진행됩니다.


💬

Need help with the API?

Open a support ticket or join the community discussion.

문의하기