Tool Library replaces ToolTable Job replaces Project
This commit is contained in:
committed by
Yorik van Havre
parent
c08202a520
commit
5398c58d6b
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user