All checks were successful
Build and Test / build (pull_request) Successful in 29m7s
Expose EditingContextResolver::contextChanged to Python addons via
two-layer design:
C++ layer:
- SDKRegistry::onContextChanged() stores callbacks and lazily connects
to the Qt signal on first registration
- pybind11 binding kcsdk.on_context_changed() wraps Python callables
with GIL-safe invocation
Python layer:
- kindred_sdk.on_context_enter(context_id, callback) subscribes to
context activation ("*" wildcard supported)
- kindred_sdk.on_context_exit(context_id, callback) subscribes to
context deactivation
- Internal tracking of previous context derives enter/exit transitions
- Emits context.enter / context.exit on the SDK event bus
Closes #381
7 lines
149 B
Python
7 lines
149 B
Python
import FreeCAD
|
|
from kindred_sdk.lifecycle import _init_lifecycle
|
|
|
|
_init_lifecycle()
|
|
|
|
FreeCAD.Console.PrintLog("kindred-addon-sdk GUI initialized\n")
|