Files
create/mods/sdk/kindred_sdk/__init__.py
forbes 747c458e23 feat(sdk): add IMenuProvider interface and register_command wrapper (#355)
IMenuProvider: declarative menu placement with optional context awareness.
C++ interface with pybind11 bindings + GIL-safe holder. SDKMenuManipulator
(shared WorkbenchManipulator) injects menu items on workbench switch,
filtered by editing context when context_ids() is non-empty.

register_command(): thin Python wrapper around FreeCADGui.addCommand()
that standardizes the calling convention within the SDK contract.

Python wrappers (kindred_sdk.register_menu, kindred_sdk.register_command)
use kcsdk-first routing with FreeCADGui fallback.
2026-03-01 14:42:00 -06:00

41 lines
1.1 KiB
Python

# kindred-addon-sdk — stable API for Kindred Create addon integration
from kindred_sdk.command import register_command
from kindred_sdk.compat import create_version, freecad_version
from kindred_sdk.context import (
current_context,
inject_commands,
refresh_context,
register_context,
register_overlay,
unregister_context,
unregister_overlay,
)
from kindred_sdk.dock import register_dock_panel
from kindred_sdk.menu import register_menu
from kindred_sdk.origin import register_origin, unregister_origin
from kindred_sdk.theme import get_theme_tokens, load_palette
from kindred_sdk.toolbar import register_toolbar
from kindred_sdk.version import SDK_VERSION
__all__ = [
"SDK_VERSION",
"register_command",
"register_context",
"unregister_context",
"register_overlay",
"unregister_overlay",
"inject_commands",
"current_context",
"refresh_context",
"get_theme_tokens",
"load_palette",
"register_menu",
"register_toolbar",
"register_origin",
"unregister_origin",
"register_dock_panel",
"create_version",
"freecad_version",
]