mirror of
https://github.com/Heretek-AI/Asset-Manager.git
synced 2026-11-07 10:45:57 -10:00
Clean-room reimplementation of observed interfaces from Anchorpoint v1.38.0 static analysis (manifest schema, automation API surface, CLI shapes). No vendor code or assets. 14 tests passing.
2.1 KiB
2.1 KiB
Python API reference
Two modules, mirroring the observed automation surface. Everything listed
here is implemented; server-backed names exist with identical signatures and
raise ServerRequiredError.
anchorpoint — UI/context bridge
import anchorpoint as ap
ctx = ap.get_context() # Context for this action run (raises outside one)
ap.UI().show_success("Done", "renamed 12 files")
with ap.Progress("Rendering", cancelable=True) as job:
job.report_progress(0.5)
dlg = ap.Dialog("Rename")
dlg.add_input("shot", var="name").add_checkbox(False, "Keep extension", var="keep")
values = dlg.show() # headless: {var: default}; GUI shell blocks
- Enums —
ActionButtonType,BrowseType,ChangeSource,TimelineChannelModuleState,VCConflictHandling,VCFileStatus. - Data —
Context(path/folder/filename/suffix, selection lists, project/workspace ids,inputs,yaml_dir, …),VCChange. - Local helpers —
temp_dir,get_application_dir,get_config,check_application,get_alternative_name,is_network_drive,log_error/log_success,get/set/has/reset_cache,join_project_path,show_in_explorer,copy_files_to_clipboard,create_commit_deeplink. - Server boundary (raise) —
lock/unlock/get_locks/update_locks/,evaluate_locks,locks_disabled/readonly,schedule_*_notification,get/update_channel_info,get/update/remove_unsynced_files.
apsync — local project/file engine
import apsync
apsync.is_project("./demo-film", recursive=True)
apsync.create_project_file("./demo-film", project_id="p1")
apsync.copy_file("a.exr", "b.exr")
apsync.create_next_version("plate_v001.exr") # -> plate_v002.exr
apsync.set_attribute("asset.png", "rating", 4)
apsync.resolve_variables("${yaml_dir}/tool", {"yaml_dir": "/x"})
apsync.generate_thumbnail("clip.mov", "thumb.png") # needs ffmpeg/ImageMagick
CLI
assetmgr actions [--root] [--scope file] · validate · info ·
project-init DIR --name N [--force] · run <action-id> [--path P] ·
status [--path P] (offline git status).