diff --git a/brayns/io/loaders/mesh/MeshLoader.cpp b/brayns/io/loaders/mesh/MeshLoader.cpp index 77605e436..7f85eccf8 100644 --- a/brayns/io/loaders/mesh/MeshLoader.cpp +++ b/brayns/io/loaders/mesh/MeshLoader.cpp @@ -42,6 +42,7 @@ #include #include #include +#include "MeshLoader.h" namespace { @@ -191,6 +192,11 @@ std::vector MeshLoader::getExtensions() const return _parsers.getAllSupportedExtensions(); } +bool MeshLoader::canLoadBinary() const +{ + return true; +} + std::vector> MeshLoader::loadBinary(const BinaryRequest &request) { auto format = std::string(request.format); diff --git a/brayns/io/loaders/mesh/MeshLoader.h b/brayns/io/loaders/mesh/MeshLoader.h index 4ae2793b6..cfe301c31 100644 --- a/brayns/io/loaders/mesh/MeshLoader.h +++ b/brayns/io/loaders/mesh/MeshLoader.h @@ -124,6 +124,13 @@ class MeshLoader : public Loader */ std::vector getExtensions() const override; + /** + * @brief Supports binary + * + * @return true + */ + bool canLoadBinary() const override; + /** * @brief Import the mesh in the given scene from the given binary data. * diff --git a/plugins/CircuitExplorer/io/bbploader/CellLoader.cpp b/plugins/CircuitExplorer/io/bbploader/CellLoader.cpp index d16c3af1a..6503038fd 100644 --- a/plugins/CircuitExplorer/io/bbploader/CellLoader.cpp +++ b/plugins/CircuitExplorer/io/bbploader/CellLoader.cpp @@ -175,7 +175,7 @@ std::vector CellLoader::load( auto colorData = ColorDataFactory::create(context); - if (loadSoma && !loadAxon && !loadDend) + if (!loadSoma && !loadAxon && !loadDend) { return SomaImporter::import(context, model, std::move(colorData)); } diff --git a/plugins/CircuitExplorer/io/bbploader/ParameterCheck.cpp b/plugins/CircuitExplorer/io/bbploader/ParameterCheck.cpp index 754a02aaa..16be0bbbd 100644 --- a/plugins/CircuitExplorer/io/bbploader/ParameterCheck.cpp +++ b/plugins/CircuitExplorer/io/bbploader/ParameterCheck.cpp @@ -114,22 +114,6 @@ class ReportChecker } } }; - -class NeuronSectionsChecker -{ -public: - static void check(const BBPLoaderParameters &input) - { - const auto &morphSettings = input.neuron_morphology_parameters; - const auto loadSoma = morphSettings.load_soma; - const auto loadAxon = morphSettings.load_axon; - const auto loadDend = morphSettings.load_dendrites; - if (!loadSoma && !loadAxon && !loadDend) - { - throw std::invalid_argument("All neuron sections cannot be disabled"); - } - } -}; } // namespace void ParameterCheck::checkInput(const brion::BlueConfig &config, const BBPLoaderParameters &input) @@ -137,6 +121,5 @@ void ParameterCheck::checkInput(const brion::BlueConfig &config, const BBPLoader InputGidSettingsChecker::check(input); TargetChecker::check(config, input); ReportChecker::check(config, input); - NeuronSectionsChecker::check(input); } } // namespace bbploader