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

Method registerBuiltInPlugin

Engine/AppManager.cpp:1512–1546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1510
1511template <typename PLUGIN>
1512void
1513AppManager::registerBuiltInPlugin(const QString& iconPath,
1514 bool isDeprecated,
1515 bool internalUseOnly)
1516{
1517 EffectInstancePtr node( PLUGIN::BuildEffect( NodePtr() ) );
1518 std::map<std::string, void (*)()> functions;
1519
1520 functions.insert( std::make_pair("BuildEffect", ( void (*)() ) & PLUGIN::BuildEffect) );
1521 LibraryBinary *binary = new LibraryBinary(functions);
1522 assert(binary);
1523
1524 std::list<std::string> grouping;
1525 node->getPluginGrouping(&grouping);
1526 QStringList qgrouping;
1527
1528 for (std::list<std::string>::iterator it = grouping.begin(); it != grouping.end(); ++it) {
1529 qgrouping.push_back( QString::fromUtf8( it->c_str() ) );
1530 }
1531
1532 // Empty since statically bundled
1533 QString resourcesPath = QString();
1534 Plugin* p = registerPlugin(resourcesPath, qgrouping, QString::fromUtf8( node->getPluginID().c_str() ), QString::fromUtf8( node->getPluginLabel().c_str() ),
1535 iconPath, QStringList(), node->isReader(), node->isWriter(), binary, node->renderThreadSafety() == eRenderSafetyUnsafe, node->getMajorVersion(), node->getMinorVersion(), isDeprecated);
1536 std::list<PluginActionShortcut> shortcuts;
1537 node->getPluginShortcuts(&shortcuts);
1538 p->setShorcuts(shortcuts);
1539
1540 PluginOpenGLRenderSupport glSupport = node->supportsOpenGLRender();
1541 p->setOpenGLRenderSupport(glSupport);
1542
1543 if (internalUseOnly) {
1544 p->setForInternalUseOnly(true);
1545 }
1546}
1547
1548void
1549AppManager::loadBuiltinNodePlugins(IOPluginsMap* /*readersMap*/,

Callers

nothing calls this directly

Calls 15

QStringListClass · 0.85
setShorcutsMethod · 0.80
supportsOpenGLRenderMethod · 0.80
setForInternalUseOnlyMethod · 0.80
QStringClass · 0.70
insertMethod · 0.45
getPluginGroupingMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
getPluginIDMethod · 0.45

Tested by

no test coverage detected