Add command line option to qrenderdoc to run a script with the UI open

This commit is contained in:
baldurk
2021-11-17 15:52:52 +00:00
parent 888676ecc7
commit 966ab0a738
6 changed files with 110 additions and 41 deletions
+10 -1
View File
@@ -172,6 +172,11 @@ int main(int argc, char *argv[])
lit("filename.py"));
parser.addOption(python);
QCommandLineOption uiscript({lit("ui-python"), lit("ui-script"), lit("ui-py")},
tr("Run a python script after opening the main UI."),
lit("filename.py"));
parser.addOption(uiscript);
// secret non-described options
QCommandLineOption installLayer(lit("install_vulkan_layer"), QString(), lit("root_or_not"));
hideOption(installLayer);
@@ -288,6 +293,10 @@ int main(int argc, char *argv[])
if(parser.isSet(crashReport))
crashReportPath = parser.value(crashReport);
QString uiscriptFile;
if(parser.isSet(uiscript))
uiscriptFile = parser.value(uiscript);
QStringList pyscripts = parser.values(python);
// load the first filename in the positional arguments.
@@ -520,7 +529,7 @@ int main(int argc, char *argv[])
if(!pythonExited)
{
ctx.Begin(filename, remoteHost, remoteIdent, temp);
ctx.Begin(filename, remoteHost, remoteIdent, temp, uiscriptFile);
while(ctx.isRunning())
{