Fixed a bug where any commented instance of show_object would throw an error.

This commit is contained in:
Jeremy Mack Wright 2018-06-11 17:02:24 -04:00
parent c7850e3f97
commit 256494807f

View File

@ -153,7 +153,7 @@ class CadQueryExecuteScript:
scriptText = cqCodePane.toPlainText().encode('utf-8')
# Check to see if we are executig a CQGI compliant script
if ("show_object(" in scriptText and "# show_object(" not in scriptText and "#show_boject(" not in scriptText) or ("debug(" in scriptText and "# debug(" not in scriptText and "#debug(" not in scriptText):
if "show_object(" in scriptText or "debug(" in scriptText:
FreeCAD.Console.PrintMessage("Executing CQGI-compliant script.\r\n")
# A repreentation of the CQ script with all the metadata attached