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

Method registerBuiltInPlugin

Engine/AppManager.cpp:1598–1632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1596
1597template <typename PLUGIN>
1598void
1599AppManager::registerBuiltInPlugin(const QString& iconPath,
1600 bool isDeprecated,
1601 bool internalUseOnly)
1602{
1603 EffectInstPtr node( PLUGIN::BuildEffect( NodePtr() ) );
1604 std::map<std::string, void (*)()> functions;
1605
1606 functions.insert( std::make_pair("BuildEffect", ( void (*)() ) & PLUGIN::BuildEffect) );
1607 LibraryBinary *binary = new LibraryBinary(functions);
1608 assert(binary);
1609
1610 std::list<std::string> grouping;
1611 node->getPluginGrouping(&grouping);
1612 QStringList qgrouping;
1613
1614 for (std::list<std::string>::iterator it = grouping.begin(); it != grouping.end(); ++it) {
1615 qgrouping.push_back( QString::fromUtf8( it->c_str() ) );
1616 }
1617
1618 // Empty since statically bundled
1619 QString resourcesPath = QString();
1620 Plugin* p = registerPlugin(resourcesPath, qgrouping, QString::fromUtf8( node->getPluginID().c_str() ), QString::fromUtf8( node->getPluginLabel().c_str() ),
1621 iconPath, QStringList(), node->isReader(), node->isWriter(), binary, node->renderThreadSafety() == eRenderSafetyUnsafe, node->getMajorVersion(), node->getMinorVersion(), isDeprecated);
1622 std::list<PluginActionShortcut> shortcuts;
1623 node->getPluginShortcuts(&shortcuts);
1624 p->setShorcuts(shortcuts);
1625
1626 PluginOpenGLRenderSupport glSupport = node->supportsOpenGLRender();
1627 p->setOpenGLRenderSupport(glSupport);
1628
1629 if (internalUseOnly) {
1630 p->setForInternalUseOnly(true);
1631 }
1632}
1633
1634void
1635AppManager::loadBuiltinNodePlugins(IOPluginsMap* /*readersMap*/,

Callers

nothing calls this directly

Calls 15

QStringClass · 0.85
QStringListClass · 0.85
setShorcutsMethod · 0.80
supportsOpenGLRenderMethod · 0.80
setForInternalUseOnlyMethod · 0.80
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