diff options
author | Robin Gareus <robin@gareus.org> | 2017-12-05 01:30:07 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-12-05 01:55:38 +0100 |
commit | bb5345614d6d4860c619e96fa174b3ffd4e8c262 (patch) | |
tree | 5cb1918a5f9c58147dc83b7066a014c87bb141f2 /libs/ardour/luascripting.cc | |
parent | d5e1f536a750906af84c490fa01176d95cdb5d3a (diff) |
Allow to pre-seed Lua action script params
Diffstat (limited to 'libs/ardour/luascripting.cc')
-rw-r--r-- | libs/ardour/luascripting.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/ardour/luascripting.cc b/libs/ardour/luascripting.cc index a3276432b2..1193e08130 100644 --- a/libs/ardour/luascripting.cc +++ b/libs/ardour/luascripting.cc @@ -410,6 +410,7 @@ LuaScriptParams::script_params (LuaState& lua, const std::string& s, const std:: std::string title = i.value ()["title"].cast<std::string> (); std::string dflt; bool optional = false; + bool preseeded = false; if (i.value ()["default"].isString ()) { dflt = i.value ()["default"].cast<std::string> (); @@ -417,7 +418,10 @@ LuaScriptParams::script_params (LuaState& lua, const std::string& s, const std:: if (i.value ()["optional"].isBoolean ()) { optional = i.value ()["optional"].cast<bool> (); } - LuaScriptParamPtr lsspp (new LuaScriptParam(name, title, dflt, optional)); + if (i.value ()["preseeded"].isBoolean ()) { + preseeded = i.value ()["preseeded"].cast<bool> (); + } + LuaScriptParamPtr lsspp (new LuaScriptParam(name, title, dflt, optional, preseeded)); rv.push_back (lsspp); } } |