feat(sdk): add IMenuProvider interface and register_command wrapper (#355) #363
Reference in New Issue
Block a user
Delete Branch "feat/gears-addon"
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
Implements issue #355 (Menu and Action System) with revised scope:
IMenuProvider — C++ interface for declarative menu placement
id(),menu_path(),items(),context_ids()SDKMenuManipulator(shared WorkbenchManipulator) injects menu items on workbench switchcontext_ids()is non-empty, items only appear when the editing context matchesPyIMenuProvider) + GIL-safe holder (PyMenuHolder)register_command() — Python wrapper
FreeCADGui.addCommand()standardizing the calling conventionPython wrappers
kindred_sdk.register_menu()— kcsdk-first routing with FreeCADGui fallbackkindred_sdk.register_command()— builds anonymous command class from callablesFiles
IMenuProvider.h,PyIMenuProvider.h,PyMenuHolder.h,command.py,menu.pySDKRegistry.h/cpp, bothCMakeLists.txt,kcsdk_py.cpp,__init__.pyVerification
libKCSDK.so+kcsdk.socompile and link cleanlycontext_ids()returns[]Closes #355