Fast Ref API / API Reference / Get Nodes

get_all_objects()

下载 Markdown

查询指定槽位的全部引用节点。对应右键菜单 All Objects

签名

api.get_all_objects(slot, select=0) -> dict

参数

名称 类型 必填 说明
slot int 槽位号(0–9)。bool/str/float → TypeError
select int (0/1) 或 bool 否(默认 0 0=仅查询,1=查询后在场景中选择

返回值

{
    "success": bool,
    "slot": int,
    "category": "all_objects",
    "count": int,
    "handles": list,               # list[int],仅有效节点
    "names": list,                 # list[str],与 handles 1:1
    "selected": int,               # 规范化 select(0 或 1)
    "selected_count": int,
    "reference_name": str,          # reference display name
    "message": str,
}

示例

from os_fast_ref.api import FastRefAPI

api = FastRefAPI()

# 仅查询
r = api.get_all_objects(slot=0)
print(r["reference_name"], r["count"], r["names"][:5])

# 查询 + 场景选择
api.get_all_objects(slot=0, select=1)

说明

  • 空结果(count=0)不是错误。
  • 非法的 slot/select 会立即抛出异常(TypeError / ValueError)。
  • 公共约定与异常表请参见 Get Nodes 概览页。
  • 额外返回 reference_name 字段。
💬

Need help with the API?

Open a support ticket or join the community discussion.

联系支持