feat(sdk): addon asset path resolution — sdk.addon_resource() #389
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Provide a standard way for addons to locate their bundled assets (icons, translations, data files) without hardcoding paths.
Current state (MISSING)
No
addon_resource()or equivalent. Addons useos.path.dirname(__file__)throughout (silo_origin.py, variousInitGui.pyfiles). This is fragile and inconsistent between development layouts (source tree) and installed layouts (CMake install prefix).Proposed API
mods/silo/) and installed layoutsFileNotFoundErrorif the resolved path doesn't existImplementation notes
kindred_sdk/assets.pyAddonRegistry.get(name).pathos.path.join(root, relative_path)with existence checkaddon_resourcefromkindred_sdk.__init__Roadmap
v0.2.0 — Addon Loader