From 8bdf36696e5261888919cd7ed3b69d179656a6f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Thu, 19 Dec 2024 19:16:29 -0300 Subject: [PATCH] Updated tlRender to display otioClipName in the HUD. --- src/docs/HISTORY.md | 4 ++++ src/lib/mrvGL/mrvGLViewportDraw.cpp | 30 +++++++++++++++-------------- tlRender | 2 +- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/docs/HISTORY.md b/src/docs/HISTORY.md index ddf611ac7..8682c2f15 100644 --- a/src/docs/HISTORY.md +++ b/src/docs/HISTORY.md @@ -39,6 +39,10 @@ v1.3.1 need to do a: $ runme.sh clean + +- Added displaying of clip names in the otio files in the HUD. +- Improved performance of Data Window and Display Window when reading + multipart OpenEXRs. v1.3.0 diff --git a/src/lib/mrvGL/mrvGLViewportDraw.cpp b/src/lib/mrvGL/mrvGLViewportDraw.cpp index 81a944e57..455ddc36b 100644 --- a/src/lib/mrvGL/mrvGLViewportDraw.cpp +++ b/src/lib/mrvGL/mrvGLViewportDraw.cpp @@ -843,8 +843,16 @@ namespace mrv if (p.hud & HudDisplay::kFilename) { - const std::string& fullname = - createStringFromPathAndTime(path, time); + std::string fullname = createStringFromPathAndTime(path, time); + if (path.getExtension() == ".otio") + { + auto i = p.tagData.find("otioClipName"); + if (i != p.tagData.end()) + { + auto otioClipName = i->second; + fullname += " ( " + otioClipName + " )"; + } + } _drawText( p.fontSystem->getGlyphs(fullname, fontInfo), pos, lineHeight, labelColor); @@ -1102,12 +1110,9 @@ namespace mrv void Viewport::_drawDataWindow() const noexcept { TLRENDER_P(); - if (p.videoData.empty() || p.videoData[0].layers.empty()) - return; - - const auto& tags = p.videoData[0].layers[0].image->getTags(); - image::Tags::const_iterator i = tags.find("Data Window"); - if (i == tags.end()) + ; + image::Tags::const_iterator i = p.tagData.find("Data Window"); + if (i == p.tagData.end()) return; const std::string& dw = i->second; @@ -1117,12 +1122,9 @@ namespace mrv void Viewport::_drawDisplayWindow() const noexcept { TLRENDER_P(); - if (p.videoData.empty() || p.videoData[0].layers.empty()) - return; - - const auto& tags = p.videoData[0].layers[0].image->getTags(); - image::Tags::const_iterator i = tags.find("Display Window"); - if (i == tags.end()) + + image::Tags::const_iterator i = p.tagData.find("Display Window"); + if (i == p.tagData.end()) return; const std::string& dw = i->second; diff --git a/tlRender b/tlRender index 463c2eff2..1489d6a73 160000 --- a/tlRender +++ b/tlRender @@ -1 +1 @@ -Subproject commit 463c2eff2eb03833cf1a1285e50fd02f7a46d037 +Subproject commit 1489d6a7397c72231eab333303c26fad6fc3e9ac