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

Method initializeKnobsPlugins

Engine/Settings.cpp:1322–1383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1320} // Settings::initializeKnobsCaching
1321
1322void
1323Settings::initializeKnobsPlugins()
1324{
1325 _pluginsTab = AppManager::createKnob<KnobPage>( this, tr("Plug-ins") );
1326 _pluginsTab->setName("plugins");
1327
1328#if defined(__linux__) || defined(__FreeBSD__)
1329 std::string searchPath("/usr/OFX/Plugins");
1330#elif defined(__APPLE__)
1331 std::string searchPath("/Library/OFX/Plugins");
1332#elif defined(WINDOWS)
1333
1334 std::wstring basePath = std::wstring( OFX::Host::PluginCache::getStdOFXPluginPath() );
1335 basePath.append( std::wstring(L" and C:\\Program Files\\Common Files\\OFX\\Plugins") );
1336 std::string searchPath = StrUtils::utf16_to_utf8(basePath);
1337
1338#endif
1339
1340 _loadBundledPlugins = AppManager::createKnob<KnobBool>( this, tr("Use bundled plug-ins") );
1341 _loadBundledPlugins->setName("useBundledPlugins");
1342 _loadBundledPlugins->setHintToolTip( tr("When checked, %1 also uses the plug-ins bundled "
1343 "with the binary distribution.\n"
1344 "When unchecked, only system-wide plug-ins found in are loaded (more information can be "
1345 "found in the help for the \"Extra plug-ins search paths\" setting).").arg( QString::fromUtf8(NATRON_APPLICATION_NAME) ) );
1346 _pluginsTab->addKnob(_loadBundledPlugins);
1347
1348 _preferBundledPlugins = AppManager::createKnob<KnobBool>( this, tr("Prefer bundled plug-ins over system-wide plug-ins") );
1349 _preferBundledPlugins->setName("preferBundledPlugins");
1350 _preferBundledPlugins->setHintToolTip( tr("When checked, and if \"Use bundled plug-ins\" is also checked, plug-ins bundled with the %1 binary distribution will take precedence over system-wide plug-ins "
1351 "if they have the same internal ID.").arg( QString::fromUtf8(NATRON_APPLICATION_NAME) ) );
1352 _pluginsTab->addKnob(_preferBundledPlugins);
1353
1354 _useStdOFXPluginsLocation = AppManager::createKnob<KnobBool>( this, tr("Enable default OpenFX plugins location") );
1355 _useStdOFXPluginsLocation->setName("useStdOFXPluginsLocation");
1356 _useStdOFXPluginsLocation->setHintToolTip( tr("When checked, %1 also uses the OpenFX plug-ins found in the default location (%2).").arg( QString::fromUtf8(NATRON_APPLICATION_NAME) ).arg( QString::fromUtf8( searchPath.c_str() ) ) );
1357 _pluginsTab->addKnob(_useStdOFXPluginsLocation);
1358
1359 _extraPluginPaths = AppManager::createKnob<KnobPath>( this, tr("OpenFX plug-ins search path") );
1360 _extraPluginPaths->setName("extraPluginsSearchPaths");
1361 _extraPluginPaths->setHintToolTip( tr("Extra search paths where %1 should scan for OpenFX plug-ins. "
1362 "Extra plug-ins search paths can also be specified using the OFX_PLUGIN_PATH environment variable.\n"
1363 "The priority order for system-wide plug-ins, from high to low, is:\n"
1364 "- plugins bundled with the binary distribution of %1 (if \"Prefer bundled plug-ins over "
1365 "system-wide plug-ins\" is checked)\n"
1366 "- plug-ins found in OFX_PLUGIN_PATH\n"
1367 "- plug-ins found in %2 (if \"Enable default OpenFX plug-ins location\" is checked)\n"
1368 "- plugins bundled with the binary distribution of %1 (if \"Prefer bundled plug-ins over "
1369 "system-wide plug-ins\" is not checked)\n"
1370 "Any change will take effect on the next launch of %1.").arg( QString::fromUtf8(NATRON_APPLICATION_NAME) ).arg( QString::fromUtf8( searchPath.c_str() ) ) );
1371 _extraPluginPaths->setMultiPath(true);
1372 _pluginsTab->addKnob(_extraPluginPaths);
1373
1374
1375 _templatesPluginPaths = AppManager::createKnob<KnobPath>( this, tr("PyPlugs search path") );
1376 _templatesPluginPaths->setName("groupPluginsSearchPath");
1377 _templatesPluginPaths->setHintToolTip( tr("Search path where %1 should scan for Python group scripts (PyPlugs). "
1378 "The search paths for groups can also be specified using the "
1379 "NATRON_PLUGIN_PATH environment variable.").arg( QString::fromUtf8(NATRON_APPLICATION_NAME) ) );

Callers

nothing calls this directly

Calls 6

utf16_to_utf8Function · 0.85
appendMethod · 0.80
setMultiPathMethod · 0.80
setNameMethod · 0.45
setHintToolTipMethod · 0.45
addKnobMethod · 0.45

Tested by

no test coverage detected