diff --git a/include/openspace/interaction/sessionrecording.h b/include/openspace/interaction/sessionrecording.h index bf3c1da067..c04a13ece1 100644 --- a/include/openspace/interaction/sessionrecording.h +++ b/include/openspace/interaction/sessionrecording.h @@ -832,16 +832,16 @@ public: ~SessionRecording_legacy_0085() {} char FileHeaderVersion[FileHeaderVersionLength+1] = "00.85"; char TargetConvertVersion[FileHeaderVersionLength+1] = "01.00"; - std::string fileFormatVersion() { + std::string fileFormatVersion() override { return std::string(FileHeaderVersion); } - std::string targetFileFormatVersion() { + std::string targetFileFormatVersion() override { return std::string(TargetConvertVersion); } - std::string getLegacyConversionResult(std::string filename, int depth); + std::string getLegacyConversionResult(std::string filename, int depth) override; struct ScriptMessage_legacy_0085 : public datamessagestructures::ScriptMessage { - void read(std::istream* in) { + void read(std::istream* in) override { size_t strLen; //Read string length from file in->read(reinterpret_cast(&strLen), sizeof(strLen)); @@ -860,7 +860,7 @@ public: protected: bool convertScript(std::stringstream& inStream, DataMode mode, int lineNum, - std::string& inputLine, std::ofstream& outFile, unsigned char* buffer); + std::string& inputLine, std::ofstream& outFile, unsigned char* buffer) override; }; } // namespace openspace diff --git a/include/openspace/network/messagestructures.h b/include/openspace/network/messagestructures.h index effe727cbe..f7b0d78fab 100644 --- a/include/openspace/network/messagestructures.h +++ b/include/openspace/network/messagestructures.h @@ -196,7 +196,9 @@ struct CameraKeyframe { << std::fixed << std::setprecision(7) << _rotation.y << ' ' << std::fixed << std::setprecision(7) << _rotation.z << ' ' << std::fixed << std::setprecision(7) << _rotation.w << ' '; - out << std::scientific << _scale << ' '; + out << std::fixed + << std::setprecision(std::numeric_limits::max_digits10) + << _scale << ' '; if (_followNodeRotation) { out << "F "; } diff --git a/scripts/drag_drop_handler.lua b/scripts/drag_drop_handler.lua index 65ad51302f..36c2bd25ce 100644 --- a/scripts/drag_drop_handler.lua +++ b/scripts/drag_drop_handler.lua @@ -42,5 +42,5 @@ elseif extension == ".asset" then return [[openspace.printInfo("Adding asset: ']] .. filename .. [[' (drag-and-drop)"); openspace.asset.add("]] .. filename .. [[");]] .. ReloadUIScript elseif extension == ".osrec" or extension == ".osrectxt" then - return [[openspace.sessionRecording.startPlayback("]] .. basename .. [[")]] + return [[openspace.sessionRecording.startPlayback("]] .. filename .. [[")]] end diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index ab2501cd8a..fe390e3648 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -355,15 +355,15 @@ bool SessionRecording::startPlayback(std::string& filename, bool loop) { std::string absFilename; - // Run through conversion in case file is older. Does nothing if the file format - // is up-to-date - filename = convertFile(filename); if (std::filesystem::is_regular_file(filename)) { absFilename = filename; } else { absFilename = absPath("${RECORDINGS}/" + filename).string(); } + // Run through conversion in case file is older. Does nothing if the file format + // is up-to-date + absFilename = convertFile(absFilename); if (_state == SessionState::Recording) { LERROR("Unable to start playback while in session recording mode"); @@ -1777,7 +1777,6 @@ bool SessionRecording::addKeyframe(Timestamps t3stamps, void SessionRecording::moveAheadInTime() { using namespace std::chrono; - bool paused = global::timeManager->isPaused(); bool playbackPaused = (_state == SessionState::PlaybackPaused); if (playbackPaused) { _playbackPauseOffset @@ -2202,7 +2201,7 @@ void SessionRecording::readFileIntoStringStream(std::string filename, std::ifstream& inputFstream, std::stringstream& stream) { - std::filesystem::path conversionInFilename = absPath("${RECORDINGS}/" + filename); + std::filesystem::path conversionInFilename = absPath(filename); if (!std::filesystem::is_regular_file(conversionInFilename)) { throw ConversionError(fmt::format( "Cannot find the specified playback file {} to convert", conversionInFilename diff --git a/src/navigation/path.cpp b/src/navigation/path.cpp index ecb776b0d4..8e6b03cdff 100644 --- a/src/navigation/path.cpp +++ b/src/navigation/path.cpp @@ -291,7 +291,12 @@ SceneGraphNode* findNodeNearTarget(const SceneGraphNode* node) { global::navigationHandler->pathNavigator().relevantNodes(); for (SceneGraphNode* n : relevantNodes) { - if (n->identifier() == node->identifier()) { + bool isSame = (n->identifier() == node->identifier()); + // If the nodes are in the very same position, they are probably representing + // the same object + isSame |= glm::distance(n->worldPosition(), node->worldPosition()) < Epsilon; + + if (isSame) { continue; }