Skip to content

Add special handling for MeshPart#346

Merged
chennes merged 1 commit intoFreeCAD:devfrom
chennes:handleMeshPart
Feb 10, 2026
Merged

Add special handling for MeshPart#346
chennes merged 1 commit intoFreeCAD:devfrom
chennes:handleMeshPart

Conversation

@chennes
Copy link
Member

@chennes chennes commented Feb 10, 2026

The Rocket WB declares a dependency on this Workbench, but it turns out it never actually gets listed by FreeCADGui.listWorkbenches(), so like Plot, it needs special handling.

Copilot AI review requested due to automatic review settings February 10, 2026 03:59
@chennes chennes merged commit 4394a64 into FreeCAD:dev Feb 10, 2026
15 checks passed
@chennes chennes deleted the handleMeshPart branch February 10, 2026 04:02
@chennes chennes added the release to main Trigger an Action to create a PR backporting to `main` label Feb 10, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a special-case dependency check for the internal MeshPart workbench/module during addon dependency evaluation, to avoid incorrectly flagging it as missing when it doesn’t show up in FreeCADGui.listWorkbenches().

Changes:

  • Add MeshPart special handling in MissingDependencies.import_from_addon() by attempting to import MeshPart when it’s not detected via listWorkbenches().
  • Log and record MeshPart as missing only if the import fails.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +760 to +766
elif dep.lower() == "meshpart":
# MeshPart is strange: it doesn't ever appear in the listWorkbenches() output
try:
__import__("MeshPart")
except ImportError:
self.wbs.append(dep)
fci.Console.PrintLog("Failed to import MeshPart module\n")
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new MeshPart special-case changes dependency detection behavior but isn’t covered by existing unit tests. Please add a test for MissingDependencies.import_from_addon that exercises both paths (MeshPart import succeeds -> not added to missing wbs; MeshPart import fails -> added and log emitted), using the existing FreeCADGui/Console mocking approach in AddonManagerTest.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Successfully created backport PR for main:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release to main Trigger an Action to create a PR backporting to `main`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant