diff --git a/ext/ghoul b/ext/ghoul index c9314d1b94..a49caf0d5a 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit c9314d1b94c365ccd598fcf7ba1608c1a310491a +Subproject commit a49caf0d5adadaa105882d7787e6d2686f1f050c diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index 15f9149982..c2c6fef101 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -161,7 +161,7 @@ namespace { }; // The scale of the model. For example if the model is in centimeters - // then ModelScale=cm + // then ModelScale = Centimeter std::optional modelScale; // Set if invisible parts (parts with no textures or materials) of the model @@ -283,8 +283,7 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) } // Import Model from file - std::string file; - file = absPath(p.geometryFile.string()); + std::string file = absPath(p.geometryFile.string()); _geometry = ghoul::io::ModelReader::ref().loadModel( file, ghoul::io::ModelReader::ForceRenderInvisible(_forceRenderInvisible), @@ -386,22 +385,22 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) } switch (*p.animationMode) { - case Parameters::AnimationMode::LoopFromStart: - _animationMode = AnimationMode::LoopFromStart; - break; - case Parameters::AnimationMode::LoopInfinitely: - _animationMode = AnimationMode::LoopInfinitely; - break; - case Parameters::AnimationMode::BounceFromStart: - _animationMode = AnimationMode::BounceFromStart; - break; - case Parameters::AnimationMode::BounceInfinitely: - _animationMode = AnimationMode::BounceInfinitely; - break; - case Parameters::AnimationMode::Once: - default: - _animationMode = AnimationMode::Once; - break; + case Parameters::AnimationMode::LoopFromStart: + _animationMode = AnimationMode::LoopFromStart; + break; + case Parameters::AnimationMode::LoopInfinitely: + _animationMode = AnimationMode::LoopInfinitely; + break; + case Parameters::AnimationMode::BounceFromStart: + _animationMode = AnimationMode::BounceFromStart; + break; + case Parameters::AnimationMode::BounceInfinitely: + _animationMode = AnimationMode::BounceInfinitely; + break; + case Parameters::AnimationMode::Once: + default: + _animationMode = AnimationMode::Once; + break; } } @@ -510,7 +509,7 @@ void RenderableModel::initialize() { } else if (_geometry->hasAnimation() && !_enableAnimation.value()) { LINFO("Model with deactivated animation was found. " - "The animation could be activated by entering a start time in the asset file" + "The animation can be activated by entering a start time in the asset file" ); } @@ -687,8 +686,7 @@ void RenderableModel::update(const UpdateData& data) { if (modulo < 0) { modulo += 2 * duration; } - realtiveTime = - duration - abs(modulo - duration); + realtiveTime = duration - abs(modulo - duration); break; } case AnimationMode::Once: diff --git a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp index e969b7fcb2..66cb67b0d8 100644 --- a/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderablemodelprojection.cpp @@ -113,8 +113,7 @@ RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& di const Parameters p = codegen::bake(dictionary); // Import Model from file - std::string file; - file = absPath(p.geometryFile.string()); + std::string file = absPath(p.geometryFile.string()); _geometry = ghoul::io::ModelReader::ref().loadModel( file, ghoul::io::ModelReader::ForceRenderInvisible::No,