Fast Ref / API Reference / Core

add_reference()

.max 파일을 새 레퍼런스로 추가합니다. 비어 있는 슬롯에 자동으로 배정됩니다.

시그니처

api.add_reference(file_path: str) -> dict

파라미터

파라미터 타입 설명
file_path str 추가할 .max 파일의 절대 경로

반환값

{
    "success": True,
    "message": str,
    "slot": int,    # 레퍼런스가 추가된 슬롯 번호
}

예외

예외 조건
FileNotFoundError 파일이 디스크에 존재하지 않을 때
ValueError 슬롯 10개가 모두 사용 중일 때

예제

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.add_reference(r"J:\assets\character_A.max")

if result['success']:
    print(f"슬롯 {result['slot']}에 추가됨")

💬

Need help with the API?

Open a support ticket or join the community discussion.

Contact Support