Files
create/mods/sdk/kindred_sdk/menu.py
forbes 79f69e2856
All checks were successful
Build and Test / build (pull_request) Successful in 28m54s
feat(sdk): remove fallbacks, add deprecation warnings, bump v1.0.0 (#357)
- Bump SDK_VERSION to 1.0.0 in version.py and package.xml
- Remove <pure_python> tag from package.xml (kcsdk is C++)
- Remove all FreeCADGui.* fallback paths in context.py, dock.py,
  toolbar.py, menu.py; require kcsdk module
- Remove query fallbacks in origin.py (keep register/unregister
  which still need FreeCADGui.addOrigin/removeOrigin)
- Add deprecation warnings to 11 superseded FreeCADGui methods
  in ApplicationPy.cpp (not addOrigin/removeOrigin)
- All 39 Tier 1 tests pass
2026-03-01 14:42:00 -06:00

22 lines
593 B
Python

"""Menu provider registration.
Routes through the ``kcsdk`` C++ module. The kcsdk module is required.
"""
def register_menu(provider):
"""Register a menu provider for declarative menu placement.
Delegates to ``kcsdk.register_menu()`` which installs a shared
WorkbenchManipulator that injects items at the specified menu path.
"""
try:
import kcsdk
except ImportError:
raise RuntimeError(
"kcsdk module not available. "
"The kindred_sdk requires the kcsdk C++ module (libKCSDK)."
)
kcsdk.register_menu(provider)