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

Method initializeKnobsPlugins

Engine/Settings.cpp:1289–1350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1287} // Settings::initializeKnobsCaching
1288
1289void
1290Settings::initializeKnobsPlugins()
1291{
1292 _pluginsTab = AppManager::createKnob<KnobPage>( this, tr("Plug-ins") );
1293 _pluginsTab->setName("plugins");
1294
1295#if defined(__linux__) || defined(__FreeBSD__)
1296 std::string searchPath("/usr/OFX/Plugins");
1297#elif defined(__APPLE__)
1298 std::string searchPath("/Library/OFX/Plugins");
1299#elif defined(WINDOWS)
1300
1301 std::wstring basePath = std::wstring( OFX::Host::PluginCache::getStdOFXPluginPath() );
1302 basePath.append( std::wstring(L" and C:\\Program Files\\Common Files\\OFX\\Plugins") );
1303 std::string searchPath = StrUtils::utf16_to_utf8(basePath);
1304
1305#endif
1306
1307 _loadBundledPlugins = AppManager::createKnob<KnobBool>( this, tr("Use bundled plug-ins") );
1308 _loadBundledPlugins->setName("useBundledPlugins");
1309 _loadBundledPlugins->setHintToolTip( tr("When checked, %1 also uses the plug-ins bundled "
1310 "with the binary distribution.\n"
1311 "When unchecked, only system-wide plug-ins found in are loaded (more information can be "
1312 "found in the help for the \"Extra plug-ins search paths\" setting).").arg( QString::fromUtf8(NATRON_APPLICATION_NAME) ) );
1313 _pluginsTab->addKnob(_loadBundledPlugins);
1314
1315 _preferBundledPlugins = AppManager::createKnob<KnobBool>( this, tr("Prefer bundled plug-ins over system-wide plug-ins") );
1316 _preferBundledPlugins->setName("preferBundledPlugins");
1317 _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 "
1318 "if they have the same internal ID.").arg( QString::fromUtf8(NATRON_APPLICATION_NAME) ) );
1319 _pluginsTab->addKnob(_preferBundledPlugins);
1320
1321 _useStdOFXPluginsLocation = AppManager::createKnob<KnobBool>( this, tr("Enable default OpenFX plugins location") );
1322 _useStdOFXPluginsLocation->setName("useStdOFXPluginsLocation");
1323 _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() ) ) );
1324 _pluginsTab->addKnob(_useStdOFXPluginsLocation);
1325
1326 _extraPluginPaths = AppManager::createKnob<KnobPath>( this, tr("OpenFX plug-ins search path") );
1327 _extraPluginPaths->setName("extraPluginsSearchPaths");
1328 _extraPluginPaths->setHintToolTip( tr("Extra search paths where %1 should scan for OpenFX plug-ins. "
1329 "Extra plug-ins search paths can also be specified using the OFX_PLUGIN_PATH environment variable.\n"
1330 "The priority order for system-wide plug-ins, from high to low, is:\n"
1331 "- plugins bundled with the binary distribution of %1 (if \"Prefer bundled plug-ins over "
1332 "system-wide plug-ins\" is checked)\n"
1333 "- plug-ins found in OFX_PLUGIN_PATH\n"
1334 "- plug-ins found in %2 (if \"Enable default OpenFX plug-ins location\" is checked)\n"
1335 "- plugins bundled with the binary distribution of %1 (if \"Prefer bundled plug-ins over "
1336 "system-wide plug-ins\" is not checked)\n"
1337 "Any change will take effect on the next launch of %1.").arg( QString::fromUtf8(NATRON_APPLICATION_NAME) ).arg( QString::fromUtf8( searchPath.c_str() ) ) );
1338 _extraPluginPaths->setMultiPath(true);
1339 _pluginsTab->addKnob(_extraPluginPaths);
1340
1341
1342 _templatesPluginPaths = AppManager::createKnob<KnobPath>( this, tr("PyPlugs search path") );
1343 _templatesPluginPaths->setName("groupPluginsSearchPath");
1344 _templatesPluginPaths->setHintToolTip( tr("Search path where %1 should scan for Python group scripts (PyPlugs). "
1345 "The search paths for groups can also be specified using the "
1346 "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