[Everywhere] FileInfo::hasExtension for multiple values (#9774)

* [Base] Add hasExtension for multiple values

* [Gui] Use hasExtension for multiple values

* [Drawing] Use hasExtension for multiple values

* [Fem] Use hasExtension for multiple values

* [Import] Use hasExtension for multiple values

* [Mesh] Use hasExtension for multiple values

* [Part] Use hasExtension for multiple values

* [TechDraw] Use hasExtension for multiple values
This commit is contained in:
Benjamin Bræstrup Sayoc
2023-08-07 17:55:19 +02:00
committed by GitHub
parent 9587393ca3
commit 33384cff9c
16 changed files with 56 additions and 68 deletions

View File

@@ -121,17 +121,8 @@ DocumentObjectExecReturn* FemPostPipeline::execute() {
bool FemPostPipeline::canRead(Base::FileInfo File) {
if (File.hasExtension("vtk") ||
// from FemResult only unstructural mesh is supported in femvtktoools.cpp
File.hasExtension("vtp") ||
File.hasExtension("vts") ||
File.hasExtension("vtr") ||
File.hasExtension("vti") ||
File.hasExtension("vtu") ||
File.hasExtension("pvtu"))
return true;
return false;
// from FemResult only unstructural mesh is supported in femvtktoools.cpp
return File.hasExtension({"vtk", "vtp", "vts", "vtr", "vti", "vtu", "pvtu"});
}
void FemPostPipeline::read(Base::FileInfo File) {