feat(sdk): add event bus for inter-addon communication (#382) #398
Reference in New Issue
Block a user
Delete Branch "feat/sdk-event-bus"
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?
Closes #382
Summary
Adds a lightweight publish-subscribe event bus so addons can communicate without importing each other directly.
New API
sdk.on(event, handler)— subscribe (deduplicates)sdk.off(event, handler)— unsubscribe (silent no-op if not found)sdk.emit(event, data)— publish dict payload to all subscribersDesign
PrintWarning, remaining handlers still fireregistry.py/statusbar.pypatterns: input validation, defensive defaults,FreeCAD.ConsoleloggingChanges
mods/sdk/kindred_sdk/events.py(new) — event bus modulemods/sdk/kindred_sdk/__init__.py— import and exportemit,on,off7567054882to54b926a925