All checks were successful
Build and Test / build (pull_request) Successful in 30m5s
- 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
22 lines
603 B
Python
22 lines
603 B
Python
"""Toolbar provider registration.
|
|
|
|
Routes through the ``kcsdk`` C++ module. The kcsdk module is required.
|
|
"""
|
|
|
|
|
|
def register_toolbar(provider):
|
|
"""Register a toolbar provider for automatic context injection.
|
|
|
|
Delegates to ``kcsdk.register_toolbar()`` which stores the provider
|
|
and auto-injects commands into the target editing contexts.
|
|
"""
|
|
try:
|
|
import kcsdk
|
|
except ImportError:
|
|
raise RuntimeError(
|
|
"kcsdk module not available. "
|
|
"The kindred_sdk requires the kcsdk C++ module (libKCSDK)."
|
|
)
|
|
|
|
kcsdk.register_toolbar(provider)
|