hello,
thanks @zipit for the answer.
@d_schmidt, please, don't forget to mark your thread as a question and mark it as solved once it is. That help us :)
Instead of getting the preferences, you can use GetModulePaths. It returns all module paths configured through g_modulePath, g_additionalModulePath and user preferences. Including Corelibs and Plugins default directories.
You can have information on Application manual
// Returns all module paths configured through g_modulePath, g_additionalModulePath and user preferences.
// include corelibs and plugins default directory.
const maxon::BaseArray<maxon::Url> myPluginPaths = maxon::Application::GetModulePaths() iferr_return;
for (auto plugPath : myPluginPaths)
DiagnosticOutput("plugins path @", plugPath);
If you do know the plugin ID, you can also use this kind of code.
const maxon::Int32 plugin_ID = 1038235;
BasePlugin* myPlugin = FindPlugin(plugin_ID, PLUGINTYPE::ANY);
if (myPlugin == nullptr)
return maxon::NullptrError(MAXON_SOURCE_LOCATION);
const Filename myPluginPath = myPlugin->GetFilename();
const maxon::String directory = myPluginPath.GetDirectory().GetString();
DiagnosticOutput("directory of plugin @ is @", plugin_ID, directory);
Cheers
Manuel