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,12 +35,9 @@ EffectEngine::EffectEngine(Hyperion * hyperion, const Json::Value & jsonEffectCo
|
||||
{
|
||||
const std::string & path = paths[i].asString();
|
||||
QDir directory(QString::fromStdString(path));
|
||||
if (!directory.exists())
|
||||
if (directory.exists())
|
||||
{
|
||||
std::cerr << "EFFECTENGINE ERROR: Effect directory can not be loaded: " << path << std::endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
int efxCount = 0;
|
||||
QStringList filenames = directory.entryList(QStringList() << "*.json", QDir::Files, QDir::Name | QDir::IgnoreCase);
|
||||
foreach (const QString & filename, filenames)
|
||||
{
|
||||
@ -48,8 +45,16 @@ EffectEngine::EffectEngine(Hyperion * hyperion, const Json::Value & jsonEffectCo
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user