diff --git a/src/Mod/Raytracing/App/AppRaytracingPy.cpp b/src/Mod/Raytracing/App/AppRaytracingPy.cpp index ff03e60882..5b124e91fc 100644 --- a/src/Mod/Raytracing/App/AppRaytracingPy.cpp +++ b/src/Mod/Raytracing/App/AppRaytracingPy.cpp @@ -203,10 +203,6 @@ private: vecs[i][l] = PyFloat_AsDouble(temp); else if (PyLong_Check(temp)) vecs[i][l] = (double) PyLong_AsLong(temp); -#if PY_MAJOR_VERSION < 3 - else if (PyInt_Check(temp)) - vecs[i][l] = (double) PyInt_AsLong(temp); -#endif else throw Py::ValueError("Wrong parameter format, four Tuple of three floats needed!"); } diff --git a/src/Mod/Raytracing/Gui/Command.cpp b/src/Mod/Raytracing/Gui/Command.cpp index 1f5a72107a..a9f6fbbb8c 100644 --- a/src/Mod/Raytracing/Gui/Command.cpp +++ b/src/Mod/Raytracing/Gui/Command.cpp @@ -261,11 +261,8 @@ void CmdRaytracingWriteView::activated(int) openCommand("Write view"); doCommand(Doc,"import Raytracing,RaytracingGui"); -#if PY_MAJOR_VERSION < 3 - doCommand(Doc,"OutFile = open(unicode(\"%s\",\"utf-8\"),\"w\")",cFullName.c_str()); -#else doCommand(Doc,"OutFile = open(\"%s\",\"w\")",cFullName.c_str()); -#endif + try { doCommand(Doc,"result = open(App.getResourceDir()+'Mod/Raytracing/Templates/ProjectStd.pov').read()"); doCommand(Doc,"content = ''"); @@ -558,11 +555,7 @@ void CmdRaytracingExportProject::activated(int) doCommand(Doc,"PageFile = open(App.activeDocument().%s.PageResult,'r')",Sel[0].FeatName); std::string fname = (const char*)fn.toUtf8(); fname = strToPython(fname); -#if PY_MAJOR_VERSION < 3 - doCommand(Doc,"OutFile = open(unicode('%s','utf-8'),'w')",fname.c_str()); -#else doCommand(Doc,"OutFile = open('%s','w')",fname.c_str()); -#endif doCommand(Doc,"OutFile.write(PageFile.read())"); doCommand(Doc,"del OutFile,PageFile");