Create kindred-addon-sdk package #249
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Summary
Create
mods/sdk/as a Python package providing a stable API for addon integration with Kindred Create's platform features (editing contexts, themes, origins, manifests). This insulates addons from C++ API changes during upstream rebases.Motivation
ztools and Silo currently call platform APIs directly — Silo uses
FreeCADGui.registerEditingOverlay(), and ztools usesGui.addWorkbenchManipulator()with a custom manipulator class. These are C++ bindings exposed to Python. During an upstream FreeCAD rebase, if signatures change, every addon breaks independently. The SDK provides a single adaptation point.Package structure
Key APIs
Context registration
Theme tokens
Manifest
Affected files
mods/sdk/— new submodulesrc/Mod/Create/Init.py— load SDK first, before other addonsmods/ztools/InitGui.py— migrate to SDK calls (follow-up issue)mods/silo/freecad/InitGui.py— migrate to SDK calls (follow-up issue)Acceptance criteria
kindred_sdkimportable from any addon'sInit.py/InitGui.pyregister_context()wrapsFreeCADGui.registerEditingContext()with validation and error handlingget_theme_tokens()returns full Catppuccin Mocha palette dictAddonManifestparses existingpackage.xmlfiles plus<kindred>extensionssdk_versionin their manifestDependencies
Notes
The SDK does NOT wrap FreeCAD's modeling API (
Part,PartDesign, etc.). Addons use those directly. The SDK only covers Create platform integration: contexts, themes, origins, manifests, and dock panel helpers.Scope change: standalone theme module with YAML-driven config. After reviewing the codebase, Catppuccin Mocha colors are duplicated across 5+ locations (icons.py, theme.py, silo_start.py, KindredCreate.cfg, KindredCreate.qss). Updated plan: the SDK theme module becomes a standalone theme system driven by a YAML palette file instead of hardcoded Python dicts. The YAML defines color tokens and the SDK processes them into Python dicts, QSS templates, SVG color injection, and preference pack values. Remaining SDK modules (context, origin, dock, compat) unchanged from original spec.