Tool Library replaces ToolTable Job replaces Project

This commit is contained in:
sliptonic
2016-06-27 09:19:15 -05:00
committed by Yorik van Havre
parent c08202a520
commit 5398c58d6b
50 changed files with 4103 additions and 1532 deletions

View File

@@ -31,10 +31,6 @@ import json
if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtCore, QtGui
from DraftTools import translate
else:
def translate(ctxt, txt):
return txt
__title__ = "Path Remote Operation"
__author__ = "sliptonic (Brad Collette)"
@@ -303,7 +299,11 @@ class CommandPathRemote:
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Remote", "Request a Path from a remote cloud service")}
def IsActive(self):
return FreeCAD.ActiveDocument is not None
if FreeCAD.ActiveDocument is not None:
for o in FreeCAD.ActiveDocument.Objects:
if o.Name[:3] == "Job":
return True
return False
def Activated(self):
ztop = 10.0
@@ -322,7 +322,7 @@ class CommandPathRemote:
FreeCADGui.doCommand('obj.StepDown = ' + str((ztop-zbottom)/8))
FreeCADGui.doCommand('obj.FinalDepth=' + str(zbottom))
FreeCADGui.doCommand('PathScripts.PathUtils.addToProject(obj)')
FreeCADGui.doCommand('PathScripts.PathUtils.addToJob(obj)')
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()