Path: ToolChange command + added Inspect command to context menu
This commit is contained in:
@@ -87,13 +87,14 @@ class PathWorkbench ( Workbench ):
|
||||
from PathScripts import PathFacePocket
|
||||
from PathScripts import PathCustom
|
||||
from PathScripts import PathInspect
|
||||
from PathScripts import PathToolChange
|
||||
|
||||
# build commands list
|
||||
projcmdlist = ["Path_Project", "Path_ToolTableEdit","Path_Post","Path_Inspect"]
|
||||
prepcmdlist = ["Path_Plane","Path_Fixture","Path_LoadTool","Path_ToolLenOffset","Path_Comment","Path_Stop"]
|
||||
opcmdlist = ["Path_Profile","Path_Kurve","Path_Pocket","Path_Drilling","Path_FromShape"]
|
||||
modcmdlist = ["Path_Copy","Path_CompoundExtended","Path_Dressup","Path_Hop","Path_Array"]
|
||||
partialcmdlist = ["Path_FaceProfile","Path_FacePocket","Path_Custom"]
|
||||
partialcmdlist = ["Path_FaceProfile","Path_FacePocket","Path_Custom","Path_ToolChange"]
|
||||
|
||||
|
||||
# Add commands to menu and toolbar
|
||||
@@ -124,6 +125,12 @@ class PathWorkbench ( Workbench ):
|
||||
|
||||
def Deactivated(self):
|
||||
Msg("Path workbench deactivated\n")
|
||||
|
||||
def ContextMenu(self, recipient):
|
||||
if len(FreeCADGui.Selection.getSelection()) == 1:
|
||||
if FreeCADGui.Selection.getSelection()[0].isDerivedFrom("Path::Feature"):
|
||||
self.appendContextMenu("",["Path_Inspect"])
|
||||
|
||||
|
||||
Gui.addWorkbench(PathWorkbench())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user