Fast Ref API
/
API Reference
/
Get Nodes
get_duplicate_nodes()
마크다운 다운로드지정 슬롯에서 이름이 중복된 노드만 조회합니다. 우클릭 메뉴 Duplicate Nodes에 대응합니다.
시그니처
api.get_duplicate_nodes(slot, select=0) -> dict
파라미터
| 이름 | 타입 | 필수 | 설명 |
|---|---|---|---|
slot |
int |
O | 슬롯 번호(0~9). bool/str/float → TypeError |
select |
int (0/1) 또는 bool |
X (기본 0) |
0=조회만, 1=조회 후 씬 선택 |
반환값
{
"success": bool,
"slot": int,
"category": "duplicate_nodes",
"count": int,
"handles": list, # list[int], valid nodes only
"names": list, # list[str], 1:1 with handles
"selected": int, # normalized select (0 or 1)
"selected_count": int,
"duplicate_names": list, # list[str] duplicate name strings
"message": str,
}
예제
from os_fast_ref.api import FastRefAPI
api = FastRefAPI()
# 조회만 (파이프라인 검증 — 씬 선택 안 함)
dup = api.get_duplicate_nodes(slot=0)
if dup["duplicate_names"]:
print("duplicates:", dup["duplicate_names"])
print("nodes:", dup["names"])
else:
print("no duplicates")
# 조회 + 씬 선택 (우클릭 메뉴와 동일)
api.get_duplicate_nodes(slot=0, select=1)
노트
- 빈 결과(
count=0)는 에러가 아닙니다. - 잘못된
slot/select는 즉시 예외입니다 (TypeError/ValueError). - 공통 계약·예외 표는 Get Nodes 개요 페이지를 참고하세요.
duplicate_names에 중복된 이름 목록이 추가로 반환됩니다. 중복이 없으면 빈 리스트입니다.