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

Method exportDocs

Engine/AppInstance.cpp:1411–1587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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