From 917db39bd1e9b06b8f7f0557a8c1ba7dde761377 Mon Sep 17 00:00:00 2001 From: 0xfedcafe <17340030+0xfedcafe@users.noreply.github.com> Date: Fri, 3 Jan 2025 00:46:11 +0100 Subject: [PATCH 1/6] implemented reader option --- application/F3DOptionsTools.cxx | 1 + application/F3DOptionsTools.h | 1 + doc/user/OPTIONS.md | 1 + library/options.json | 3 +++ library/private/factory.h | 13 +++++++++++++ library/src/factory.cxx.in | 24 +++++++++++++++++++++++- library/src/scene_impl.cxx | 12 +++++++++++- 7 files changed, 53 insertions(+), 2 deletions(-) diff --git a/application/F3DOptionsTools.cxx b/application/F3DOptionsTools.cxx index e57c749bf4..fa9121d6a2 100644 --- a/application/F3DOptionsTools.cxx +++ b/application/F3DOptionsTools.cxx @@ -65,6 +65,7 @@ static inline const std::array CLIOptions = {{ { "no-background", "", "No background when render to file", "", "1" }, { "help", "h", "Print help", "", "" }, { "version", "", "Print version details", "", "" }, { "list-readers", "", "Print the list of readers", "", "" }, + {"reader", "", "Enforce specific reader", "", ""}, { "list-bindings", "", "Print the list of interaction bindings and exits, ignored with `--no-render`, only considers the first file group.", "", "" }, { "config", "", "Specify the configuration file to use. absolute/relative path or filename/filestem to search in configuration file locations", "", "" }, { "no-config", "", "Do not read the configuration file", "", "1" }, diff --git a/application/F3DOptionsTools.h b/application/F3DOptionsTools.h index dce906ad0a..9ff86cd88e 100644 --- a/application/F3DOptionsTools.h +++ b/application/F3DOptionsTools.h @@ -126,6 +126,7 @@ static inline const std::map LibOptionsNames { "anti-aliasing", "render.effect.anti_aliasing" }, { "tone-mapping", "render.effect.tone_mapping" }, { "final-shader", "render.effect.final_shader" }, + { "reader", "render.reader" }, }; /** diff --git a/doc/user/OPTIONS.md b/doc/user/OPTIONS.md index 26b36aadcb..203ee03465 100644 --- a/doc/user/OPTIONS.md +++ b/doc/user/OPTIONS.md @@ -14,6 +14,7 @@ Options|Type
Default|Description -h, \-\-help||Print *help* and exit. Ignore `--verbose`. \-\-version||Show *version* information and exit. Ignore `--verbose`. \-\-list-readers||List available *readers* and exit. Ignore `--verbose`. +\-\-reader=\|string
-|Enforce specific reader. \-\-list-bindings||List available *bindings* and exit. Ignore `--verbose`. \-\-list-rendering-backends||List available *rendering backends* and exit. Ignore `--verbose`. \-\-config=\|string
config|Specify the [configuration file](CONFIGURATION_FILE.md) to use. Supports absolute/relative path but also filename/filestem to search for in standard configuration file locations. diff --git a/library/options.json b/library/options.json index 31ece9b78f..95c8830711 100644 --- a/library/options.json +++ b/library/options.json @@ -28,6 +28,9 @@ } }, "render": { + "reader": { + "type": "string" + }, "show_edges": { "type": "bool" }, diff --git a/library/private/factory.h b/library/private/factory.h index c1edca7f1d..dfbc1e7466 100644 --- a/library/private/factory.h +++ b/library/private/factory.h @@ -17,6 +17,7 @@ #include "reader.h" #include +#include #include namespace f3d @@ -57,6 +58,16 @@ class factory */ plugin_initializer_t getStaticInitializer(const std::string& pluginName); + /** + * Set preferred reader + */ + bool setPreferredReader(const std::string& preferredReader); + + /** + * Get preferred reader + */ + std::optional getPreferredReader(); + protected: factory(); virtual ~factory() = default; @@ -66,6 +77,8 @@ class factory std::vector Plugins; std::map StaticPluginInitializers; + + std::optional Reader; }; } #endif diff --git a/library/src/factory.cxx.in b/library/src/factory.cxx.in index 97a58bffee..0ce373f3a1 100644 --- a/library/src/factory.cxx.in +++ b/library/src/factory.cxx.in @@ -49,7 +49,11 @@ reader* factory::getReader(const std::string& fileName) { for (auto r : p->getReaders()) { - if (r->getScore() > bestScore && r->canRead(fileName)) + if (this->Reader.has_value() && r->getName() == *(this->Reader)) + { + return r->canRead(fileName) ? r.get() : nullptr; + } + if (r->canRead(fileName) && r->getScore() > bestScore) { bestScore = r->getScore(); bestReader = r.get(); @@ -99,4 +103,22 @@ bool factory::registerOnce(plugin* plug) } return false; } + +//---------------------------------------------------------------------------- +bool factory::setPreferredReader(const std::string& preferredReader) { + if (preferredReader == "") + { + return false; + } + else + { + this->Reader = preferredReader; + return true; + } +} + +//---------------------------------------------------------------------------- +std::optional factory::getPreferredReader() { + return this->Reader; } +} \ No newline at end of file diff --git a/library/src/scene_impl.cxx b/library/src/scene_impl.cxx index 5303b23f1e..d2ee77fa72 100644 --- a/library/src/scene_impl.cxx +++ b/library/src/scene_impl.cxx @@ -11,6 +11,7 @@ #include "vtkF3DMemoryMesh.h" #include "vtkF3DMetaImporter.h" +#include #include #include #include @@ -231,8 +232,17 @@ scene& scene_impl::add(const std::vector& filePaths) throw scene::load_failure_exception(filePath.string() + " does not exists"); } + auto* factory = f3d::factory::instance(); + + if (const auto& opts = this->Internals->Options; + !factory->getPreferredReader().has_value() && opts.render.reader.has_value()) + { + const auto& reader = opts.render.reader; + factory->setPreferredReader(*reader); + } + // Recover the importer for the provided file path - f3d::reader* reader = f3d::factory::instance()->getReader(filePath.string()); + f3d::reader* reader = factory->getReader(filePath.string()); if (reader) { log::debug( From c85a20c59dd62a47906c63e6b441ceb32fe4a73d Mon Sep 17 00:00:00 2001 From: 0xfedcafe <17340030+0xfedcafe@users.noreply.github.com> Date: Fri, 3 Jan 2025 02:00:29 +0100 Subject: [PATCH 2/6] added test & bugfix --- library/public/engine.h | 5 +++ library/src/engine.cxx | 8 ++++ library/src/scene_impl.cxx | 5 +-- library/testing/CMakeLists.txt | 1 + library/testing/TestSDKReaderSelection.cxx | 46 ++++++++++++++++++++++ 5 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 library/testing/TestSDKReaderSelection.cxx diff --git a/library/public/engine.h b/library/public/engine.h index 32760408f9..7a052a4aea 100644 --- a/library/public/engine.h +++ b/library/public/engine.h @@ -234,6 +234,11 @@ class F3D_EXPORT engine */ [[nodiscard]] interactor& getInteractor(); + /** + * Get the enforced readers name + */ + [[nodiscard]] std::string_view getReader(); + /** * List rendering backends supported by libf3d. * All backends have an associated boolean flag indicating if it can be used. diff --git a/library/src/engine.cxx b/library/src/engine.cxx index 5d083d529f..d28c89430f 100644 --- a/library/src/engine.cxx +++ b/library/src/engine.cxx @@ -481,6 +481,14 @@ std::vector engine::getReadersInfo() return readersInfo; } +//---------------------------------------------------------------------------- +std::string_view engine::getReader() +{ + static const std::string empty_str = ""; // used to avoid dangling pointer; a bit strange way + auto prefReader = factory::instance()->getPreferredReader(); + return prefReader.has_value() ? *prefReader : empty_str; +} + //---------------------------------------------------------------------------- engine& engine::setCachePath(const fs::path& cachePath) { diff --git a/library/src/scene_impl.cxx b/library/src/scene_impl.cxx index d2ee77fa72..1ceae2b2ea 100644 --- a/library/src/scene_impl.cxx +++ b/library/src/scene_impl.cxx @@ -234,10 +234,9 @@ scene& scene_impl::add(const std::vector& filePaths) auto* factory = f3d::factory::instance(); - if (const auto& opts = this->Internals->Options; - !factory->getPreferredReader().has_value() && opts.render.reader.has_value()) + if (auto reader = this->Internals->Options.render.reader; reader.has_value()) { - const auto& reader = opts.render.reader; + log::debug("Current value of a reader:" + *reader + "\n"); factory->setPreferredReader(*reader); } diff --git a/library/testing/CMakeLists.txt b/library/testing/CMakeLists.txt index 9dfc7e9a33..483e4e9ca7 100644 --- a/library/testing/CMakeLists.txt +++ b/library/testing/CMakeLists.txt @@ -15,6 +15,7 @@ list(APPEND libf3dSDKTests_list TestSDKMultiColoring.cxx TestSDKOptions.cxx TestSDKOptionsIO.cxx + TestSDKReaderSelection.cxx TestSDKRenderFinalShader.cxx TestSDKUtils.cxx TestSDKWindowAuto.cxx diff --git a/library/testing/TestSDKReaderSelection.cxx b/library/testing/TestSDKReaderSelection.cxx new file mode 100644 index 0000000000..c67819d28c --- /dev/null +++ b/library/testing/TestSDKReaderSelection.cxx @@ -0,0 +1,46 @@ +#include "PseudoUnitTest.h" +#include "TestSDKHelpers.h" + +#include +#include +#include +#include + +namespace fs = std::filesystem; +int TestSDKReaderSelection(int argc, char* argv[]) +{ + PseudoUnitTest test; + + f3d::log::setVerboseLevel(f3d::log::VerboseLevel::DEBUG); + f3d::engine::autoloadPlugins(); + + // Test file path setup + std::string monkey = std::string(argv[1]) + "data/red_translucent_monkey.gltf"; + + // Test default reader (no preference) + { + f3d::engine engine = f3d::engine::create(true); + f3d::scene& scene = engine.getScene(); + test("add with a single path", [&]() { scene.add(fs::path(monkey)); }); + } + + // Test Draco reader + { + f3d::engine engine = f3d::engine::create(true); + engine.getOptions().render.reader = "GLTFDraco"; + f3d::scene& scene = engine.getScene(); + test("Draco reader works", [&]() { scene.add(fs::path(monkey)); }); + test("Reader is GLTFDraco", engine.getReader() == "GLTFDraco"); + } + + // Test GLTF reader + { + f3d::engine engine = f3d::engine::create(true); + engine.getOptions().render.reader = "GLTF"; + f3d::scene& scene = engine.getScene(); + test("GLTF reader works", [&]() { scene.add(fs::path(monkey)); }); + test("Reader is GLTF", engine.getReader() == "GLTF"); + } + + return test.result(); +} \ No newline at end of file From 45ba1a919759e276040d083c3194af28d333a074 Mon Sep 17 00:00:00 2001 From: 0xfedcafe <17340030+0xfedcafe@users.noreply.github.com> Date: Fri, 3 Jan 2025 02:17:52 +0100 Subject: [PATCH 3/6] spelling correction --- application/F3DOptionsTools.cxx | 2 +- doc/user/OPTIONS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/F3DOptionsTools.cxx b/application/F3DOptionsTools.cxx index fa9121d6a2..0c3893869d 100644 --- a/application/F3DOptionsTools.cxx +++ b/application/F3DOptionsTools.cxx @@ -65,7 +65,7 @@ static inline const std::array CLIOptions = {{ { "no-background", "", "No background when render to file", "", "1" }, { "help", "h", "Print help", "", "" }, { "version", "", "Print version details", "", "" }, { "list-readers", "", "Print the list of readers", "", "" }, - {"reader", "", "Enforce specific reader", "", ""}, + {"reader", "", "Enforce a specific reader", "", ""}, { "list-bindings", "", "Print the list of interaction bindings and exits, ignored with `--no-render`, only considers the first file group.", "", "" }, { "config", "", "Specify the configuration file to use. absolute/relative path or filename/filestem to search in configuration file locations", "", "" }, { "no-config", "", "Do not read the configuration file", "", "1" }, diff --git a/doc/user/OPTIONS.md b/doc/user/OPTIONS.md index 203ee03465..b19c2fea59 100644 --- a/doc/user/OPTIONS.md +++ b/doc/user/OPTIONS.md @@ -14,7 +14,7 @@ Options|Type
Default|Description -h, \-\-help||Print *help* and exit. Ignore `--verbose`. \-\-version||Show *version* information and exit. Ignore `--verbose`. \-\-list-readers||List available *readers* and exit. Ignore `--verbose`. -\-\-reader=\|string
-|Enforce specific reader. +\-\-reader=\|string
-|Enforce a specific reader. \-\-list-bindings||List available *bindings* and exit. Ignore `--verbose`. \-\-list-rendering-backends||List available *rendering backends* and exit. Ignore `--verbose`. \-\-config=\|string
config|Specify the [configuration file](CONFIGURATION_FILE.md) to use. Supports absolute/relative path but also filename/filestem to search for in standard configuration file locations. From 5b00fcb954a7ec7c09774182222f5ec7910f3f8e Mon Sep 17 00:00:00 2001 From: 0xfedcafe <17340030+0xfedcafe@users.noreply.github.com> Date: Fri, 3 Jan 2025 02:25:52 +0100 Subject: [PATCH 4/6] reformat --- library/src/factory.cxx.in | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/library/src/factory.cxx.in b/library/src/factory.cxx.in index 0ce373f3a1..d7f2afac6d 100644 --- a/library/src/factory.cxx.in +++ b/library/src/factory.cxx.in @@ -52,7 +52,7 @@ reader* factory::getReader(const std::string& fileName) if (this->Reader.has_value() && r->getName() == *(this->Reader)) { return r->canRead(fileName) ? r.get() : nullptr; - } + } if (r->canRead(fileName) && r->getScore() > bestScore) { bestScore = r->getScore(); @@ -105,20 +105,22 @@ bool factory::registerOnce(plugin* plug) } //---------------------------------------------------------------------------- -bool factory::setPreferredReader(const std::string& preferredReader) { - if (preferredReader == "") +bool factory::setPreferredReader(const std::string& preferredReader) +{ + if (preferredReader == "") { return false; } - else - { + else + { this->Reader = preferredReader; return true; } } //---------------------------------------------------------------------------- -std::optional factory::getPreferredReader() { +std::optional factory::getPreferredReader() +{ return this->Reader; } } \ No newline at end of file From e916daff7e5bb733b6fe85562f6fe384ea68c773 Mon Sep 17 00:00:00 2001 From: 0xfedcafe <17340030+0xfedcafe@users.noreply.github.com> Date: Fri, 3 Jan 2025 20:00:08 +0100 Subject: [PATCH 5/6] force-reader to scene & fixes --- application/F3DOptionsTools.cxx | 2 +- application/F3DOptionsTools.h | 3 ++- library/options.json | 6 +++--- library/private/factory.h | 15 ++------------ library/public/engine.h | 5 ----- library/src/engine.cxx | 8 -------- library/src/factory.cxx.in | 24 ++-------------------- library/src/scene_impl.cxx | 15 +++++--------- library/testing/TestSDKReaderSelection.cxx | 13 ++++++------ 9 files changed, 21 insertions(+), 70 deletions(-) diff --git a/application/F3DOptionsTools.cxx b/application/F3DOptionsTools.cxx index 0c3893869d..db32571fc7 100644 --- a/application/F3DOptionsTools.cxx +++ b/application/F3DOptionsTools.cxx @@ -65,7 +65,7 @@ static inline const std::array CLIOptions = {{ { "no-background", "", "No background when render to file", "", "1" }, { "help", "h", "Print help", "", "" }, { "version", "", "Print version details", "", "" }, { "list-readers", "", "Print the list of readers", "", "" }, - {"reader", "", "Enforce a specific reader", "", ""}, + {"force-reader", "", "Enforce a specific reader", "", ""}, { "list-bindings", "", "Print the list of interaction bindings and exits, ignored with `--no-render`, only considers the first file group.", "", "" }, { "config", "", "Specify the configuration file to use. absolute/relative path or filename/filestem to search in configuration file locations", "", "" }, { "no-config", "", "Do not read the configuration file", "", "1" }, diff --git a/application/F3DOptionsTools.h b/application/F3DOptionsTools.h index 9ff86cd88e..7cde46da15 100644 --- a/application/F3DOptionsTools.h +++ b/application/F3DOptionsTools.h @@ -57,6 +57,7 @@ static inline const OptionsDict DefaultAppOptions = { { "interaction-test-play", "" }, { "command-script", "" }, { "frame-rate", "30.0" }, + { "force-reader", "" }, }; /** @@ -80,6 +81,7 @@ static inline const std::map LibOptionsNames { "animation-autoplay", "scene.animation.autoplay" }, { "animation-index", "scene.animation.index" }, { "animation-speed-factor", "scene.animation.speed_factor" }, + { "force-reader", "scene.force_reader" }, { "font-file", "ui.font_file" }, { "point-sprites", "model.point_sprites.enable" }, { "point-sprites-type", "model.point_sprites.type" }, @@ -126,7 +128,6 @@ static inline const std::map LibOptionsNames { "anti-aliasing", "render.effect.anti_aliasing" }, { "tone-mapping", "render.effect.tone_mapping" }, { "final-shader", "render.effect.final_shader" }, - { "reader", "render.reader" }, }; /** diff --git a/library/options.json b/library/options.json index 95c8830711..4abf643418 100644 --- a/library/options.json +++ b/library/options.json @@ -25,12 +25,12 @@ "orthographic": { "type": "bool" } + }, + "force_reader": { + "type": "string" } }, "render": { - "reader": { - "type": "string" - }, "show_edges": { "type": "bool" }, diff --git a/library/private/factory.h b/library/private/factory.h index dfbc1e7466..ddd883e99d 100644 --- a/library/private/factory.h +++ b/library/private/factory.h @@ -18,6 +18,7 @@ #include #include +#include #include namespace f3d @@ -45,7 +46,7 @@ class factory /** * Get the reader that can read the given file, nullptr if none */ - reader* getReader(const std::string& fileName); + reader* getReader(const std::string& fileName, std::optional forceReader); /** * Get the list of the registered plugins @@ -58,16 +59,6 @@ class factory */ plugin_initializer_t getStaticInitializer(const std::string& pluginName); - /** - * Set preferred reader - */ - bool setPreferredReader(const std::string& preferredReader); - - /** - * Get preferred reader - */ - std::optional getPreferredReader(); - protected: factory(); virtual ~factory() = default; @@ -77,8 +68,6 @@ class factory std::vector Plugins; std::map StaticPluginInitializers; - - std::optional Reader; }; } #endif diff --git a/library/public/engine.h b/library/public/engine.h index 7a052a4aea..32760408f9 100644 --- a/library/public/engine.h +++ b/library/public/engine.h @@ -234,11 +234,6 @@ class F3D_EXPORT engine */ [[nodiscard]] interactor& getInteractor(); - /** - * Get the enforced readers name - */ - [[nodiscard]] std::string_view getReader(); - /** * List rendering backends supported by libf3d. * All backends have an associated boolean flag indicating if it can be used. diff --git a/library/src/engine.cxx b/library/src/engine.cxx index 766b748d57..ada3e2e370 100644 --- a/library/src/engine.cxx +++ b/library/src/engine.cxx @@ -481,14 +481,6 @@ std::vector engine::getReadersInfo() return readersInfo; } -//---------------------------------------------------------------------------- -std::string_view engine::getReader() -{ - static const std::string empty_str = ""; // used to avoid dangling pointer; a bit strange way - auto prefReader = factory::instance()->getPreferredReader(); - return prefReader.has_value() ? *prefReader : empty_str; -} - //---------------------------------------------------------------------------- engine& engine::setCachePath(const fs::path& cachePath) { diff --git a/library/src/factory.cxx.in b/library/src/factory.cxx.in index d7f2afac6d..fcb56cadfe 100644 --- a/library/src/factory.cxx.in +++ b/library/src/factory.cxx.in @@ -40,7 +40,7 @@ factory::plugin_initializer_t factory::getStaticInitializer(const std::string& p } //---------------------------------------------------------------------------- -reader* factory::getReader(const std::string& fileName) +reader* factory::getReader(const std::string& fileName, std::optional forceReader) { int bestScore = -1; reader* bestReader = nullptr; @@ -49,7 +49,7 @@ reader* factory::getReader(const std::string& fileName) { for (auto r : p->getReaders()) { - if (this->Reader.has_value() && r->getName() == *(this->Reader)) + if (forceReader.has_value() && r->getName() == *forceReader) { return r->canRead(fileName) ? r.get() : nullptr; } @@ -103,24 +103,4 @@ bool factory::registerOnce(plugin* plug) } return false; } - -//---------------------------------------------------------------------------- -bool factory::setPreferredReader(const std::string& preferredReader) -{ - if (preferredReader == "") - { - return false; - } - else - { - this->Reader = preferredReader; - return true; - } -} - -//---------------------------------------------------------------------------- -std::optional factory::getPreferredReader() -{ - return this->Reader; -} } \ No newline at end of file diff --git a/library/src/scene_impl.cxx b/library/src/scene_impl.cxx index 1ceae2b2ea..2c52eed33c 100644 --- a/library/src/scene_impl.cxx +++ b/library/src/scene_impl.cxx @@ -4,6 +4,7 @@ #include "interactor_impl.h" #include "log.h" #include "options.h" +#include "scene.h" #include "window_impl.h" #include "factory.h" @@ -232,16 +233,9 @@ scene& scene_impl::add(const std::vector& filePaths) throw scene::load_failure_exception(filePath.string() + " does not exists"); } - auto* factory = f3d::factory::instance(); - - if (auto reader = this->Internals->Options.render.reader; reader.has_value()) - { - log::debug("Current value of a reader:" + *reader + "\n"); - factory->setPreferredReader(*reader); - } - // Recover the importer for the provided file path - f3d::reader* reader = factory->getReader(filePath.string()); + f3d::reader* reader = f3d::factory::instance()->getReader( + filePath.string(), this->Internals->Options.scene.force_reader); if (reader) { log::debug( @@ -323,7 +317,8 @@ scene& scene_impl::clear() //---------------------------------------------------------------------------- bool scene_impl::supports(const fs::path& filePath) { - return f3d::factory::instance()->getReader(filePath.string()) != nullptr; + return f3d::factory::instance()->getReader( + filePath.string(), this->Internals->Options.scene.force_reader) != nullptr; } //---------------------------------------------------------------------------- diff --git a/library/testing/TestSDKReaderSelection.cxx b/library/testing/TestSDKReaderSelection.cxx index c67819d28c..8e5427d7eb 100644 --- a/library/testing/TestSDKReaderSelection.cxx +++ b/library/testing/TestSDKReaderSelection.cxx @@ -24,23 +24,22 @@ int TestSDKReaderSelection(int argc, char* argv[]) test("add with a single path", [&]() { scene.add(fs::path(monkey)); }); } - // Test Draco reader + // Test Draco reader; GLTF is by-default { f3d::engine engine = f3d::engine::create(true); - engine.getOptions().render.reader = "GLTFDraco"; + engine.getOptions().scene.force_reader = "GLTFDraco"; f3d::scene& scene = engine.getScene(); test("Draco reader works", [&]() { scene.add(fs::path(monkey)); }); - test("Reader is GLTFDraco", engine.getReader() == "GLTFDraco"); + test("Reader is GLTFDraco", engine.getOptions().scene.force_reader == "GLTFDraco"); } - // Test GLTF reader + // Test GLTF reader; { f3d::engine engine = f3d::engine::create(true); - engine.getOptions().render.reader = "GLTF"; + engine.getOptions().scene.force_reader = "GLTF"; f3d::scene& scene = engine.getScene(); test("GLTF reader works", [&]() { scene.add(fs::path(monkey)); }); - test("Reader is GLTF", engine.getReader() == "GLTF"); + test("Reader is GLTF", engine.getOptions().scene.force_reader == "GLTF"); } - return test.result(); } \ No newline at end of file From 17c2dda210ad5701276f957b095a464efe633c38 Mon Sep 17 00:00:00 2001 From: 0xfedcafe <17340030+0xfedcafe@users.noreply.github.com> Date: Fri, 3 Jan 2025 20:17:26 +0100 Subject: [PATCH 6/6] bugfix --- application/F3DOptionsTools.cxx | 2 +- application/F3DOptionsTools.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/application/F3DOptionsTools.cxx b/application/F3DOptionsTools.cxx index db32571fc7..32948d8c68 100644 --- a/application/F3DOptionsTools.cxx +++ b/application/F3DOptionsTools.cxx @@ -65,7 +65,7 @@ static inline const std::array CLIOptions = {{ { "no-background", "", "No background when render to file", "", "1" }, { "help", "h", "Print help", "", "" }, { "version", "", "Print version details", "", "" }, { "list-readers", "", "Print the list of readers", "", "" }, - {"force-reader", "", "Enforce a specific reader", "", ""}, + {"force-reader", "", "Enforce a specific reader", "", "1"}, { "list-bindings", "", "Print the list of interaction bindings and exits, ignored with `--no-render`, only considers the first file group.", "", "" }, { "config", "", "Specify the configuration file to use. absolute/relative path or filename/filestem to search in configuration file locations", "", "" }, { "no-config", "", "Do not read the configuration file", "", "1" }, diff --git a/application/F3DOptionsTools.h b/application/F3DOptionsTools.h index 7cde46da15..2b6cd4bcc2 100644 --- a/application/F3DOptionsTools.h +++ b/application/F3DOptionsTools.h @@ -57,7 +57,6 @@ static inline const OptionsDict DefaultAppOptions = { { "interaction-test-play", "" }, { "command-script", "" }, { "frame-rate", "30.0" }, - { "force-reader", "" }, }; /**