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

Method exportDocs

Engine/AppInstance.cpp:1405–1577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1403}
1404
1405void
1406AppInstance::exportDocs(const QString path)
1407{
1408 if ( !path.isEmpty() ) {
1409 QStringList groups;
1410 // Group ordering is set at every place in the code where GROUP_ORDER appears in the comments
1411 groups << QString::fromUtf8(PLUGIN_GROUP_IMAGE);
1412 groups << QString::fromUtf8(PLUGIN_GROUP_PAINT);
1413 groups << QString::fromUtf8(PLUGIN_GROUP_TIME);
1414 groups << QString::fromUtf8(PLUGIN_GROUP_CHANNEL);
1415 groups << QString::fromUtf8(PLUGIN_GROUP_COLOR);
1416 groups << QString::fromUtf8(PLUGIN_GROUP_FILTER);
1417 groups << QString::fromUtf8(PLUGIN_GROUP_KEYER);
1418 groups << QString::fromUtf8(PLUGIN_GROUP_MERGE);
1419 groups << QString::fromUtf8(PLUGIN_GROUP_TRANSFORM);
1420 groups << QString::fromUtf8(PLUGIN_GROUP_MULTIVIEW);
1421 groups << QString::fromUtf8(PLUGIN_GROUP_OTHER);
1422 groups << QString::fromUtf8("Extra"); // openfx-arena
1423 QVector<QStringList> plugins;
1424
1425 // Generate a MD for each plugin
1426 // IMPORTANT: this code is *very* similar to DocumentationManager::handler(...) is section "_group.html"
1427 std::list<std::string> pluginIDs = appPTR->getPluginIDs();
1428 for (std::list<std::string>::iterator it = pluginIDs.begin(); it != pluginIDs.end(); ++it) {
1429 QString pluginID = QString::fromUtf8( it->c_str() );
1430 if ( !pluginID.isEmpty() ) {
1431 Plugin* plugin = 0;
1432 QString pluginID = QString::fromUtf8( it->c_str() );
1433 plugin = appPTR->getPluginBinary(pluginID, -1, -1, false);
1434 if ( plugin && !plugin->getIsDeprecated() && ( !plugin->getIsForInternalUseOnly() || plugin->isReader() || plugin->isWriter() ) ) {
1435 QStringList groups = plugin->getGrouping();
1436 groups << groups.at(0);
1437 QStringList plugList;
1438 plugList << plugin->getGrouping().at(0) << pluginID << Plugin::makeLabelWithoutSuffix( plugin->getPluginLabel() );
1439 plugins << plugList;
1440 CreateNodeArgs args( pluginID.toStdString(), boost::shared_ptr<NodeCollection>() );
1441 args.setProperty(kCreateNodeArgsPropNoNodeGUI, true);
1442 args.setProperty(kCreateNodeArgsPropOutOfProject, true);
1443 args.setProperty(kCreateNodeArgsPropSilent, true);
1444 qDebug() << pluginID;
1445 // IMPORTANT: this code is *very* similar to DocumentationManager::handler(...) is section "_plugin.html"
1446 NodePtr node = createNode(args);
1447 if ( node &&
1448 pluginID != QString::fromUtf8(PLUGINID_NATRON_READ) &&
1449 pluginID != QString::fromUtf8(PLUGINID_NATRON_WRITE) ) {
1450 EffectInstPtr effectInstance = node->getEffectInstance();
1451 if ( effectInstance && effectInstance->isReader() ) {
1452 ReadNode* isReadNode = dynamic_cast<ReadNode*>( effectInstance.get() );
1453
1454 if (isReadNode) {
1455 NodePtr subnode = isReadNode->getEmbeddedReader();
1456 if (subnode) {
1457 node = subnode;
1458 }
1459 }
1460 } else if ( effectInstance && effectInstance->isWriter() ) {
1461 WriteNode* isWriteNode = dynamic_cast<WriteNode*>( effectInstance.get() );
1462

Callers

nothing calls this directly

Calls 15

getPluginBinaryMethod · 0.80
getIsDeprecatedMethod · 0.80
atMethod · 0.80
toStdStringMethod · 0.80
setPropertyMethod · 0.80
getEffectInstanceMethod · 0.80
getEmbeddedReaderMethod · 0.80
getEmbeddedWriterMethod · 0.80
mkdirMethod · 0.80
absolutePathMethod · 0.80
makeDocumentationMethod · 0.80

Tested by

no test coverage detected