| 931 | } |
| 932 | |
| 933 | void |
| 934 | Gui::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 | |
| 955 | void |
| 956 | Gui::exportProjectAsGroup() |
no test coverage detected