mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 08:40:55 +00:00
Add command line option to qrenderdoc to run a script with the UI open
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user