Skip to content

Commit

Permalink
Updated tlRender to display otioClipName in the HUD.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Dec 19, 2024
1 parent d8dc6ba commit 8bdf366
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
4 changes: 4 additions & 0 deletions src/docs/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 16 additions & 14 deletions src/lib/mrvGL/mrvGLViewportDraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 8bdf366

Please sign in to comment.