Fast Ref / API Reference / Core

get_reference_list()

현재 씬에 등록된 레퍼런스 전체 목록을 반환합니다.

시그니처

api.get_reference_list() -> dict

반환값

{
    "success": True,
    "count": int,       # 유효한 레퍼런스 수
    "data": [
        {
            "slot": int,            # 슬롯 번호 (0–9)
            "name": str,            # 레퍼런스 표시 이름
            "filename": str,        # 소스 .max 파일 경로
            "namespace": str,       # 노드에 적용된 네임스페이스
            "space_activate": bool, # True = 네임스페이스 현재 활성화됨
            "unpack": bool,         # True = 그룹에서 분리(Unpack)된 상태
        },
        ...
    ]
}

예제

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()
refs = api.get_reference_list()

print(f"총 {refs['count']}개")
for ref in refs['data']:
    space = "ON" if ref['space_activate'] else "OFF"
    print(f"  [{ref['slot']}] {ref['name']}  ns={ref['namespace']}  space={space}")

출력 예:

총 3개
  [0] dummy_female  ns=dummy_female_01  space=ON
  [1] dummy_male    ns=dummy_male_01    space=ON
  [2] prop_sword    ns=prop_sword_01    space=ON

💬

Need help with the API?

Open a support ticket or join the community discussion.

Contact Support