Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default sequences replaced when comparing media from FPTR #545

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/lib/app/RvApp/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@ Options::Options()
presentFormat = (char*)"";
presentData = (char*)"";

addSourceToDefaultView = true;

#ifdef PLATFORM_DARWIN
fontSize1 = 13;
fontSize2 = 10;
Expand Down Expand Up @@ -493,6 +495,7 @@ Options::parseSourceArgs(const Files& inputFiles)
inSource = true;
sources.resize(sources.size() + 1);
sources.back().singleSource = true;
sources.back().addSourceToDefaultView = true;

SourceArgs& a = sources.back();

Expand Down
7 changes: 5 additions & 2 deletions src/lib/app/RvApp/RvApp/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ struct Options
{
SourceArgs() : audioOffset(0), rangeOffset(0), volume(1), fps(0),
pixelAspect(0), stereoRelativeOffset(0), stereoRightOffset(0),
hascrop(false), hasuncrop(false), singleSource (false),
noMovieAudio(false)
hascrop(false), hasuncrop(false), singleSource(false),
noMovieAudio(false), addSourceToDefaultView(true)
{
cutIn = (std::numeric_limits<int>::max)();
cutOut = (std::numeric_limits<int>::max)();
Expand All @@ -59,6 +59,7 @@ struct Options
float stereoRightOffset;
int cutIn;
int cutOut;
bool addSourceToDefaultView;
std::string fcdl;
std::string lcdl;
std::string flut;
Expand Down Expand Up @@ -341,6 +342,8 @@ struct Options
int fontSize1;
int fontSize2;

bool addSourceToDefaultView;

SendExternalEventVector sendEvents;
};

Expand Down
9 changes: 8 additions & 1 deletion src/lib/app/RvApp/RvGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,14 @@ RvGraph::connectNewSourcesToDefaultViews()
copy(layer->inputs().begin(), layer->inputs().end(), inputs.begin());
copy(m_newSources.begin(), m_newSources.end(), inputs.begin()+layer->inputs().size());
HOP_ZONE( HOP_ZONE_COLOR_12 );
layer->setInputs(inputs);

if (Rv::Options::sharedOptions().addSourceToDefaultView)
{
layer->setInputs(inputs);
} else
{
cout << "INFO: Disabled adding sources to default views" << endl;
}
}

m_newSources.clear();
Expand Down
12 changes: 12 additions & 0 deletions src/lib/app/RvCommon/MuUICommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,12 @@ void initUICommands()
Return, "void",
End),

new Function(c, "setConnectNewSourcesToDefaultViews", setConnectNewSourcesToDefaultViews, None,
Return, "void",
Parameters,
new Param(c, "enable", "bool"),
End),

EndArguments);
}

Expand Down Expand Up @@ -2335,4 +2341,10 @@ NODE_IMPLEMENTATION(rvioSetup, void)
// backward compatibility.
}

NODE_IMPLEMENTATION(setConnectNewSourcesToDefaultViews, void)
{
bool enable = NODE_ARG(0, bool);
Rv::Options::sharedOptions().addSourceToDefaultView = enable;
}

} // Rv namespace
1 change: 1 addition & 0 deletions src/lib/app/RvCommon/RvCommon/MuUICommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ NODE_DECLARATION(validateShotgunToken, Mu::Pointer);
NODE_DECLARATION(launchTLI, void);
NODE_DECLARATION(rvioSetup, void);
NODE_DECLARATION(javascriptMuExport, void);
NODE_DECLARATION(setConnectNewSourcesToDefaultViews, void);


} // Rv
Expand Down
2 changes: 1 addition & 1 deletion src/lib/app/TwkApp/Bundle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <TwkApp/Bundle.h>
#include <sstream>
#include <boost/filesystem.hpp>
#include <TwkUtil/file.h>
#include <TwkUtil/File.h>

namespace TwkApp {
using namespace std;
Expand Down