From fbb34347f83ea81c44c0ed668bdd22bc727258b9 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Sat, 10 Jun 2017 00:23:18 -0700 Subject: [PATCH] Added support for PanelSheets. --- src/Mod/Path/Gui/Resources/panels/DlgJobCreate.ui | 3 +++ src/Mod/Path/PathScripts/PathJob.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/Gui/Resources/panels/DlgJobCreate.ui b/src/Mod/Path/Gui/Resources/panels/DlgJobCreate.ui index 6ad723138d..8a2eba7842 100644 --- a/src/Mod/Path/Gui/Resources/panels/DlgJobCreate.ui +++ b/src/Mod/Path/Gui/Resources/panels/DlgJobCreate.ui @@ -39,6 +39,9 @@ true + + <html><head/><body><p>Select a template to be used for the job.</p><p><br/></p><p>In case there are no templates you can create one through the popup menu of an existing job. Name the file job_*.xml and place it in the macro or the path directory (see preferences) in order to be selectable from this list.</p><p><br/></p><p>Note that the result is a plain xml file and can be edited by hand. Any properties not specified in the template will be set to their default value.</p></body></html> + diff --git a/src/Mod/Path/PathScripts/PathJob.py b/src/Mod/Path/PathScripts/PathJob.py index 6c0660bcb4..640c3f379d 100644 --- a/src/Mod/Path/PathScripts/PathJob.py +++ b/src/Mod/Path/PathScripts/PathJob.py @@ -22,6 +22,7 @@ # * * # *************************************************************************** +import ArchPanel import Draft import FreeCAD import Path @@ -347,7 +348,7 @@ class DlgJobCreate: else: selected = None index = 0 - for solid in sorted(filter(lambda obj: hasattr(obj, 'Shape') and obj.Shape.isClosed(), FreeCAD.ActiveDocument.Objects), key=lambda o: o.Label): + for solid in sorted(filter(lambda obj: (hasattr(obj, 'Shape') and obj.Shape.isClosed()) or (hasattr(obj, 'Proxy') and isinstance(obj.Proxy, ArchPanel.PanelSheet)), FreeCAD.ActiveDocument.Objects), key=lambda o: o.Label): if solid.Label == selected: index = self.dialog.cbModel.count() self.dialog.cbModel.addItem(solid.Label)