Fixed the script location environment variables not getting exported when running CQGI-compliant script.
This commit is contained in:
parent
59bbbc3958
commit
9ee734bc65
|
@ -162,6 +162,10 @@ class CadQueryExecuteScript:
|
||||||
if b"show_object(" in scriptText or b"debug(" in scriptText:
|
if b"show_object(" in scriptText or b"debug(" in scriptText:
|
||||||
FreeCAD.Console.PrintMessage("Executing CQGI-compliant script.\r\n")
|
FreeCAD.Console.PrintMessage("Executing CQGI-compliant script.\r\n")
|
||||||
|
|
||||||
|
# Set some environment variables that may help the user
|
||||||
|
os.environ["MYSCRIPT_FULL_PATH"] = cqCodePane.get_path()
|
||||||
|
os.environ["MYSCRIPT_DIR"] = os.path.dirname(os.path.abspath(cqCodePane.get_path()))
|
||||||
|
|
||||||
# A repreentation of the CQ script with all the metadata attached
|
# A repreentation of the CQ script with all the metadata attached
|
||||||
cqModel = cqgi.parse(scriptText)
|
cqModel = cqgi.parse(scriptText)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user