Fast Ref / API Reference / Manage

add_reference()

Download Markdown

Adds a .max file as a reference in the current scene. Automatically assigned to the next free slot.

Signature

api.add_reference(file_path: str) -> dict

Parameters

Parameter Type Description
file_path str Full path to the .max file to add

Return Value

{
    "success": True,
    "message": str,
    "slot": int,
}

Errors

Error Cause
FileNotFoundError File not found on disk
ValueError All 10 slots are occupied

Example

from os_fast_ref.api import FastRefAPI
api = FastRefAPI()
result = api.add_reference(r"J:\assets\character_A.max")
if result['success']:
    print(f"Added to slot {result['slot']}")

v2: Confirmation dialog is suppressed automatically.


💬

Need help with the API?

Open a support ticket or join the community discussion.

Contact Support