fix(cpn): Handle mixer scripts with no inputs def. (#2523)
Because it seems like I managed to configure it just so and Companion didn't like that.
This commit is contained in:
@@ -543,10 +543,12 @@ struct convert<ScriptData> {
|
||||
node["file"] >> rhs.filename;
|
||||
node["name"] >> rhs.name;
|
||||
|
||||
for (int i=0; i < CPN_MAX_SCRIPT_INPUTS; i++) {
|
||||
if (node["inputs"][std::to_string(i)]) {
|
||||
if (node["inputs"][std::to_string(i)]["u"]["value"]) {
|
||||
node["inputs"][std::to_string(i)]["u"]["value"] >> rhs.inputs[i];
|
||||
if (node["inputs"]) {
|
||||
for (int i = 0; i < CPN_MAX_SCRIPT_INPUTS; i++) {
|
||||
if (node["inputs"][std::to_string(i)]) {
|
||||
if (node["inputs"][std::to_string(i)]["u"]["value"]) {
|
||||
node["inputs"][std::to_string(i)]["u"]["value"] >> rhs.inputs[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user