Remove enabled property from the video module

This commit is contained in:
Alexander Bock
2025-07-08 17:44:26 +02:00
parent 1b9f6b8f28
commit cceb5f25dd
2 changed files with 2 additions and 32 deletions

View File

@@ -33,39 +33,13 @@
#include <openspace/documentation/documentation.h>
#include <openspace/scripting/lualibrary.h>
namespace {
constexpr openspace::properties::Property::PropertyInfo EnabledInfo = {
"Enabled",
"Enabled",
"Decides if this module should be enabled."
};
struct [[codegen::Dictionary(VideoModule)]] Parameters {
// [[codegen::verbatim(EnabledInfo.description)]]
std::optional<bool> enabled;
};
#include "videomodule_codegen.cpp"
} // namespace
namespace openspace {
documentation::Documentation VideoModule::Documentation() {
return codegen::doc<Parameters>("module_video");
}
VideoModule::VideoModule()
: OpenSpaceModule(VideoModule::Name)
, _enabled(EnabledInfo)
{
addProperty(_enabled);
}
void VideoModule::internalInitialize(const ghoul::Dictionary& dict) {
const Parameters p = codegen::bake<Parameters>(dict);
_enabled = p.enabled.value_or(_enabled);
{}
void VideoModule::internalInitialize(const ghoul::Dictionary&) {
ghoul::TemplateFactory<globebrowsing::TileProvider>* fTileProvider =
FactoryManager::ref().factory<globebrowsing::TileProvider>();
ghoul_assert(fTileProvider, "TileProvider factory was not created");

View File

@@ -38,13 +38,9 @@ public:
VideoModule();
std::vector<documentation::Documentation> documentations() const override;
static documentation::Documentation Documentation();
protected:
void internalInitialize(const ghoul::Dictionary& dict) override;
private:
properties::BoolProperty _enabled;
};
} // namespace openspace