MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / onSourceScriptClicked

Method onSourceScriptClicked

Gui/ScriptEditor.cpp:357–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355}
356
357void
358ScriptEditor::onSourceScriptClicked()
359{
360 std::vector<std::string> filters;
361
362 filters.push_back("py");
363 SequenceFileDialog dialog(this, filters, false, SequenceFileDialog::eFileDialogModeOpen, getGui()->getLastLoadProjectDirectory().toStdString(),
364 getGui(), false);
365
366 if ( dialog.exec() ) {
367 QDir currentDir = dialog.currentDirectory();
368 getGui()->updateLastOpenedProjectPath( currentDir.absolutePath() );
369
370 QString fileName( QString::fromUtf8( dialog.selectedFiles().c_str() ) );
371 sourceScript(fileName);
372 }
373}
374
375void
376ScriptEditor::onLoadScriptClicked()

Callers

nothing calls this directly

Calls 8

getGuiFunction · 0.85
toStdStringMethod · 0.80
currentDirectoryMethod · 0.80
absolutePathMethod · 0.80
selectedFilesMethod · 0.80
push_backMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected