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

Method exportGroupAsPythonScript

Gui/Gui50.cpp:933–953  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

931}
932
933void
934Gui::exportGroupAsPythonScript(NodeCollection* collection)
935{
936 assert(collection);
937 NodesList nodes = collection->getNodes();
938 bool hasOutput = false;
939 for (NodesList::iterator it = nodes.begin(); it != nodes.end(); ++it) {
940 if ( (*it)->isActivated() && dynamic_cast<GroupOutput*>( (*it)->getEffectInstance().get() ) ) {
941 hasOutput = true;
942 break;
943 }
944 }
945
946 if (!hasOutput) {
947 Dialogs::errorDialog( tr("Export").toStdString(), tr("To export as group, at least one Output node must exist.").toStdString() );
948
949 return;
950 }
951 ExportGroupTemplateDialog dialog(collection, this, this);
952 ignore_result( dialog.exec() );
953}
954
955void
956Gui::exportProjectAsGroup()

Callers 1

knobChangedMethod · 0.45

Calls 9

ignore_resultFunction · 0.85
getNodesMethod · 0.80
getEffectInstanceMethod · 0.80
toStdStringMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
isActivatedMethod · 0.45
getMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected