mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
better output for effect path loading (#652)
* better output for effect path loading * effectengine: error when no efx available Former-commit-id: 7724e56850ef9f9a703fb41e82baf88e5534f492
This commit is contained in:
parent
0940872870
commit
06afe06774
@ -35,23 +35,28 @@ EffectEngine::EffectEngine(Hyperion * hyperion, const Json::Value & jsonEffectCo
|
|||||||
{
|
{
|
||||||
const std::string & path = paths[i].asString();
|
const std::string & path = paths[i].asString();
|
||||||
QDir directory(QString::fromStdString(path));
|
QDir directory(QString::fromStdString(path));
|
||||||
if (!directory.exists())
|
if (directory.exists())
|
||||||
{
|
{
|
||||||
std::cerr << "EFFECTENGINE ERROR: Effect directory can not be loaded: " << path << std::endl;
|
int efxCount = 0;
|
||||||
continue;
|
QStringList filenames = directory.entryList(QStringList() << "*.json", QDir::Files, QDir::Name | QDir::IgnoreCase);
|
||||||
}
|
foreach (const QString & filename, filenames)
|
||||||
|
|
||||||
QStringList filenames = directory.entryList(QStringList() << "*.json", QDir::Files, QDir::Name | QDir::IgnoreCase);
|
|
||||||
foreach (const QString & filename, filenames)
|
|
||||||
{
|
|
||||||
EffectDefinition def;
|
|
||||||
if (loadEffectDefinition(path, filename.toStdString(), def))
|
|
||||||
{
|
{
|
||||||
_availableEffects.push_back(def);
|
EffectDefinition def;
|
||||||
|
if (loadEffectDefinition(path, filename.toStdString(), def))
|
||||||
|
{
|
||||||
|
_availableEffects.push_back(def);
|
||||||
|
efxCount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
std::cerr << "EFFECTENGINE INFO: " << efxCount << " effects loaded from directory " << path << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_availableEffects.size() == 0)
|
||||||
|
{
|
||||||
|
std::cerr << "EFFECTENGINE ERROR: no effects found, check your effect directories" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// initialize the python interpreter
|
// initialize the python interpreter
|
||||||
std::cout << "EFFECTENGINE INFO: Initializing Python interpreter" << std::endl;
|
std::cout << "EFFECTENGINE INFO: Initializing Python interpreter" << std::endl;
|
||||||
Effect::registerHyperionExtensionModule();
|
Effect::registerHyperionExtensionModule();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user