Removed some code that was breaking certain filenames.

This commit is contained in:
Jeremy Mack Wright 2017-04-12 17:25:37 -04:00
parent b474cec733
commit 1a76a05e4a

View File

@ -119,27 +119,11 @@ class CadQueryExecuteScript:
# Grab our code editor so we can interact with it
cqCodePane = Shared.getActiveCodePane()
# Clear the old render before re-rendering
# Shared.clearActiveDocument()
# Save our code to a tempfile and render it
tempFile = tempfile.NamedTemporaryFile(delete=False)
tempFile.write(cqCodePane.toPlainText().encode('utf-8'))
tempFile.close()
# docname = os.path.splitext(os.path.basename(cqCodePane.file.path))[0]
#
# # Make sure we replace any troublesome characters
# for ch in ['&', '#', '.', '-', '$', '%', ',', ' ']:
# if ch in docname:
# docname = docname.replace(ch, "")
#
# # If the matching 3D view has been closed, we need to open a new one
# try:
# FreeCAD.getDocument(docname)
# except:
# FreeCAD.newDocument(docname)
# We import this way because using execfile() causes non-standard script execution in some situations
imp.load_source('temp_module', tempFile.name)