Skip to content

Commit

Permalink
Renamed ocio:: combine and split view functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Sep 10, 2024
1 parent b1d0ef6 commit 74e7efb
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/lib/mrvApp/mrvApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ namespace mrv
{
if (!p.options.ocioOptions.view.empty())
{
const std::string& merged = ocio::displayViewShortened(
const std::string& merged = ocio::combineView(
p.options.ocioOptions.display,
p.options.ocioOptions.view);
ocio::setView(merged);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/mrvFl/mrvCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ namespace mrv

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

Expand Down
12 changes: 6 additions & 6 deletions src/lib/mrvFl/mrvOCIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ namespace mrv
{
// Set the default ocio display/view as found in config.ocio
// file.
display_view = displayViewShortened(defaultDisplay,
display_view = combineView(defaultDisplay,
defaultView);
}

Expand Down Expand Up @@ -681,7 +681,7 @@ namespace mrv
uiOCIOView->do_callback();
}

std::string displayViewShortened(
std::string combineView(
const std::string& display, const std::string& view)
{
if (display.empty() || view.empty() || view == kInactive)
Expand Down Expand Up @@ -712,7 +712,7 @@ namespace mrv
return out;
}

void splitViewIntoDisplayView(
void splitView(
const std::string& combined, std::string& display,
std::string& view)
{
Expand Down Expand Up @@ -846,7 +846,7 @@ namespace mrv
.arg(display);
throw std::runtime_error(err);
}
auto display_view = displayViewShortened(display, defaultView);
auto display_view = combineView(display, defaultView);
setView(display_view);
}

Expand Down Expand Up @@ -1002,7 +1002,7 @@ namespace mrv
setConfig(ocio.fileName);
setIcs(ocio.input);
std::string view =
displayViewShortened(ocio.display, ocio.view);
combineView(ocio.display, ocio.view);
setView(view);
setLook(ocio.look);

Expand Down Expand Up @@ -1046,7 +1046,7 @@ namespace mrv

std::string display, view;
std::string combined = ocio::view();
splitViewIntoDisplayView(combined, display, view);
splitView(combined, display, view);

ocio.display = display;
ocio.view = view;
Expand Down
5 changes: 3 additions & 2 deletions src/lib/mrvFl/mrvOCIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ namespace mrv
void setLook(const std::string&);

//! Given a display and view, return mrv2's merged display view format
std::string displayViewShortened(
std::string combineView(
const std::string& display, const std::string& view);

void splitViewIntoDisplayView(
//! Given a combined (display/view) return separate display and view.
void splitView(
const std::string& combined, std::string& display,
std::string& view);

Expand Down
4 changes: 2 additions & 2 deletions src/lib/mrvGL/mrvTimelineViewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ namespace mrv
if (viewIndex >= 0)
{
const std::string& combined = ocio::view();
ocio::splitViewIntoDisplayView(combined, o.display, o.view);
ocio::splitView(combined, o.display, o.view);
}

std::string look = p.ui->uiOCIOLook->label();
Expand Down Expand Up @@ -2414,7 +2414,7 @@ namespace mrv
{
p.previous_screen = screen;
const std::string& combined =
ocio::displayViewShortened(o.display, o.view);
ocio::combineView(o.display, o.view);
p.ui->uiOCIOView->copy_label(combined.c_str());
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/mrvNetwork/mrvCommandInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ namespace mrv
ui->uiICS->value(index);

std::string mergedView =
ocio::displayViewShortened(o.display, o.view);
ocio::combineView(o.display, o.view);
index = ocio::viewIndex(mergedView);
ui->uiOCIOView->value(index);

Expand Down
4 changes: 2 additions & 2 deletions src/lib/mrvUI/mrvMenus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ namespace mrv
{
const timeline::OCIOOptions& o = uiView->getOCIOOptions(0);
std::string combined =
ocio::displayViewShortened(o.display, o.view);
ocio::combineView(o.display, o.view);

for (int i = 0; i < ui->uiOCIOView->children(); ++i)
{
Expand Down Expand Up @@ -1433,7 +1433,7 @@ namespace mrv
const timeline::OCIOOptions& o = uiView->getOCIOOptions(m);
std::string monitorName = mrv::desktop::monitorName(m);
std::string combined =
ocio::displayViewShortened(o.display, o.view);
ocio::combineView(o.display, o.view);
combined = monitorName + "/" + combined;

for (int i = 0; i < ui->uiOCIOView->children(); ++i)
Expand Down

0 comments on commit 74e7efb

Please sign in to comment.