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

Method onSourceScriptClicked

Gui/ScriptEditor.cpp:351–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected