From 9fb41b90cee2a0cde94bb330379663f291ba9f09 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Fri, 11 Sep 2020 21:01:43 +0000 Subject: [PATCH] Add read_assimp inside GridIn::read(std::string) --- source/grid/grid_in.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/grid/grid_in.cc b/source/grid/grid_in.cc index 421e30db9c..84eec6bef3 100644 --- a/source/grid/grid_in.cc +++ b/source/grid/grid_in.cc @@ -3036,7 +3036,6 @@ GridIn::read(const std::string &filename, Format format) else name = search.find(filename, default_suffix(format)); - std::ifstream in(name.c_str()); if (format == Default) { @@ -3049,7 +3048,16 @@ GridIn::read(const std::string &filename, Format format) format = parse_format(ext); } } - read(in, format); + + if (format == assimp) + { + read_assimp(name); + } + else + { + std::ifstream in(name.c_str()); + read(in, format); + } } -- 2.39.5