Mesh: Workaround to load 3mf files not supported by zipios library
This commit is contained in:
@@ -393,3 +393,17 @@ std::vector<std::string> Base::Tools::splitSubName(const std::string& subname)
|
||||
|
||||
return subNames;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
void Base::ZipTools::rewrite(const std::string& source, const std::string& target)
|
||||
{
|
||||
Base::PyGILStateLocker lock;
|
||||
PyObject* module = PyImport_ImportModule("freecad.utils_zip");
|
||||
if (!module) {
|
||||
throw Py::Exception();
|
||||
}
|
||||
|
||||
Py::Module commands(module, true);
|
||||
commands.callMemberFunction("rewrite", Py::TupleN(Py::String(source), Py::String(target)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user