Fast Ref / API Reference / Core

set_space_activate()

지정된 슬롯의 Space Activate(네임스페이스)를 ON/OFF 합니다. 노드, SelectionSet, 레이어 이름의 네임스페이스 접두사를 일괄 적용/제거합니다.

시그니처

api.set_space_activate(slot: int, on: bool) -> dict

파라미터

파라미터 타입 설명
slot int 슬롯 번호 (0–9)
on bool True = 네임스페이스 ON, False = OFF

반환값

{
    "success": True,
    "message": 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

api = FastRefAPI()

# 네임스페이스 OFF (FBX 내보내기 전 정리 등)
api.set_space_activate(slot=0, on=False)

# 다시 ON
api.set_space_activate(slot=0, on=True)
참고: 여러 레퍼런스를 OFF할 때는 호출 순서에 따라 suffix(.r1, .r2 등)가 다르게 붙을 수 있습니다. 일관된 결과가 필요하면 항상 같은 순서로 호출하세요.

💬

Need help with the API?

Open a support ticket or join the community discussion.

Contact Support