Fast Ref / API Reference / Core

convert_to_reference()

3dsMax에서 현재 선택된 오브젝트들을 Fast Ref 레퍼런스로 변환합니다. API 호출 전에 3dsMax에서 오브젝트를 선택해 두어야 합니다.

시그니처

api.convert_to_reference(namespace: str = None) -> dict

파라미터

파라미터 타입 설명
namespace str 네임스페이스 이름. None이면 자동 생성

반환값

{
    "success": True,
    "message": str,
    "slot": int,        # 할당된 슬롯 번호
    "namespace": str,   # 적용된 네임스페이스 이름
}

예외

예외 조건
ValueError 선택된 오브젝트가 없거나 슬롯이 가득 찼을 때

예제

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

# 3dsMax에서 오브젝트를 먼저 선택한 후:
api = FastRefAPI()
result = api.convert_to_reference(namespace="MyCharacter")

print(f"슬롯 {result['slot']}에 변환됨  (ns: {result['namespace']})")
💬

Need help with the API?

Open a support ticket or join the community discussion.

Contact Support