diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 77b7cce4e6..5e627476ef 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -155,6 +155,7 @@ using namespace Gui::DockWnd; using namespace std; namespace sp = std::placeholders; +FC_LOG_LEVEL_INIT("Gui") Application* Application::Instance = nullptr; @@ -892,6 +893,10 @@ void Application::exportTo(const char* FileName, const char* DocName, const char string unicodepath = Base::Tools::escapedUnicodeFromUtf8(File.filePath().c_str()); unicodepath = Base::Tools::escapeEncodeFilename(unicodepath); + if (strcmp(Module, "Part") == 0) { + FC_WARN("Exporting with 'Part' is deprecated, use 'ImportGui' instead"); + } + if (Module) { try { std::vector sel = diff --git a/src/Mod/Part/App/AppPartPy.cpp b/src/Mod/Part/App/AppPartPy.cpp index fc5b27c823..0c156338c5 100644 --- a/src/Mod/Part/App/AppPartPy.cpp +++ b/src/Mod/Part/App/AppPartPy.cpp @@ -111,6 +111,8 @@ # include "FT2FC.h" #endif +FC_LOG_LEVEL_INIT("Part") + extern const char* BRepBuilderAPI_FaceErrorText(BRepBuilderAPI_FaceError fe); namespace Part { @@ -784,6 +786,7 @@ private: pcDoc->recompute(); } else { + FC_WARN("Importing BREP via 'Part' is deprecated. Use 'ImportGui' instead."); TopoShape shape; shape.read(EncodedName.c_str()); diff --git a/src/Mod/Part/App/ImportIges.cpp b/src/Mod/Part/App/ImportIges.cpp index 705557bd0d..f7ff3744fd 100644 --- a/src/Mod/Part/App/ImportIges.cpp +++ b/src/Mod/Part/App/ImportIges.cpp @@ -40,17 +40,20 @@ # include #endif +#include #include #include #include "ImportIges.h" #include "PartFeature.h" +FC_LOG_LEVEL_INIT("Part") using namespace Part; int Part::ImportIgesParts(App::Document *pcDoc, const char* FileName) { + FC_WARN("Importing IGES via 'Part' is deprecated. Use 'ImportGui' instead."); try { Base::FileInfo fi(FileName); // read iges file diff --git a/src/Mod/Part/App/ImportStep.cpp b/src/Mod/Part/App/ImportStep.cpp index 6790536171..67b9d4a67c 100644 --- a/src/Mod/Part/App/ImportStep.cpp +++ b/src/Mod/Part/App/ImportStep.cpp @@ -51,6 +51,7 @@ #include "ShapeMapHasher.h" #include "PartFeature.h" +FC_LOG_LEVEL_INIT("Part") namespace Part { bool ReadColors (const Handle(XSControl_WorkSession) &WS, std::map& hash_col); @@ -68,6 +69,8 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* Name) TopoDS_Shape aShape; Base::FileInfo fi(Name); + FC_WARN("Importing STEP via 'Part' is deprecated. Use 'ImportGui' instead."); + if (!fi.exists()) { std::stringstream str; str << "File '" << Name << "' does not exist!";