Skip to content

Commit

Permalink
OCIO refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Sep 1, 2024
1 parent baa3f86 commit 8842359
Show file tree
Hide file tree
Showing 15 changed files with 152 additions and 153 deletions.
16 changes: 8 additions & 8 deletions src/lib/mrvApp/mrvApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -923,17 +923,17 @@ namespace mrv
try
{
if (!p.options.ocioOptions.input.empty())
ocio::setOcioIcs(p.options.ocioOptions.input);
ocio::setIcs(p.options.ocioOptions.input);

if (!p.options.ocioOptions.look.empty())
ocio::setOcioLook(p.options.ocioOptions.look);
ocio::setLook(p.options.ocioOptions.look);

if (!p.options.ocioOptions.display.empty() &&
!p.options.ocioOptions.view.empty())
{
const std::string& merged = ocio::ocioDisplayViewShortened(
const std::string& merged = ocio::displayViewShortened(
p.options.ocioOptions.display, p.options.ocioOptions.view);
ocio::setOcioView(merged);
ocio::setView(merged);
}
}
catch (const std::exception& e)
Expand Down Expand Up @@ -1530,8 +1530,8 @@ namespace mrv
p.activeFiles[0]->inOutRange = p.player->inOutRange();
p.activeFiles[0]->audioOffset = p.player->audioOffset();
p.activeFiles[0]->annotations = p.player->getAllAnnotations();
p.activeFiles[0]->ocioIcs = ocio::ocioIcs();
p.activeFiles[0]->ocioLook = ocio::ocioLook();
p.activeFiles[0]->ocioIcs = ocio::ics();
p.activeFiles[0]->ocioLook = ocio::look();
p.activeFiles[0]->lutOptions = p.lutOptions;
}

Expand Down Expand Up @@ -1719,7 +1719,7 @@ namespace mrv
}
else
{
ocio::setOcioIcs(activeFiles[0]->ocioIcs);
ocio::setIcs(activeFiles[0]->ocioIcs);
}
}
catch (const std::exception& e)
Expand All @@ -1730,7 +1730,7 @@ namespace mrv
try
{
if (!activeFiles[0]->ocioLook.empty())
ocio::setOcioLook(activeFiles[0]->ocioLook);
ocio::setLook(activeFiles[0]->ocioLook);
}
catch (const std::exception& e)
{
Expand Down
10 changes: 5 additions & 5 deletions src/lib/mrvFl/mrvCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ namespace mrv
if (pos != std::string::npos)
{
ics = ics.substr(pos + colorSpace.size() + 1, ics.size());
ocio::setOcioIcs(ics);
ocio::setIcs(ics);
}
}

Expand All @@ -1488,7 +1488,7 @@ namespace mrv
if (pos != std::string::npos)
{
look = look.substr(pos + colorSpace.size() + 1, look.size());
ocio::setOcioLook(look);
ocio::setLook(look);
}
}

Expand Down Expand Up @@ -1520,11 +1520,11 @@ namespace mrv

// Split combined display/view into separate parts.
timeline::OCIOOptions o;
ocio::ocioSplitViewIntoDisplayView(combined, o.display, o.view);
ocio::splitViewIntoDisplayView(combined, o.display, o.view);
if (numMonitors == 1)
{
// If only one monitor, update main UI.
ocio::setOcioView(combined);
ocio::setView(combined);
}
else
{
Expand Down Expand Up @@ -1560,7 +1560,7 @@ namespace mrv
{
// Split combined display/view into separate parts.
timeline::OCIOOptions o;
ocio::ocioSplitViewIntoDisplayView(combined, o.display, o.view);
ocio::splitViewIntoDisplayView(combined, o.display, o.view);
ui->uiView->setOCIOOptions(i, o);
}

Expand Down
Loading

0 comments on commit 8842359

Please sign in to comment.