Convert usage of PathStop to Path.Op.Gui.Stop
This commit is contained in:
@@ -819,7 +819,7 @@ class CommandPathSanity:
|
||||
fname = obj.PostProcessorOutputFile
|
||||
data["outputfilename"] = os.path.splitext(os.path.basename(fname))[0]
|
||||
for op in obj.Operations.Group:
|
||||
if isinstance(op.Proxy, PathScripts.PathStop.Stop) and op.Stop is True:
|
||||
if isinstance(op.Proxy, Path.Op.Gui.Stop.Stop) and op.Stop is True:
|
||||
data["optionalstops"] = "True"
|
||||
|
||||
if obj.LastPostProcessOutput == "":
|
||||
|
||||
@@ -124,16 +124,16 @@ class CommandPathStop:
|
||||
FreeCAD.ActiveDocument.openTransaction(
|
||||
"Add Optional or Mandatory Stop to the program"
|
||||
)
|
||||
FreeCADGui.addModule("PathScripts.PathStop")
|
||||
FreeCADGui.addModule("Path.Op.Gui.Stop")
|
||||
snippet = """
|
||||
import Path
|
||||
import PathScripts
|
||||
from PathScripts import PathUtils
|
||||
prjexists = False
|
||||
obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython","Stop")
|
||||
PathScripts.PathStop.Stop(obj)
|
||||
Path.Op.Gui.Stop.Stop(obj)
|
||||
|
||||
PathScripts.PathStop._ViewProviderStop(obj.ViewObject)
|
||||
Path.Op.Gui.Stop._ViewProviderStop(obj.ViewObject)
|
||||
PathUtils.addToJob(obj)
|
||||
"""
|
||||
FreeCADGui.doCommand(snippet)
|
||||
|
||||
Reference in New Issue
Block a user