diff options
author | Robin Gareus <robin@gareus.org> | 2017-12-05 00:12:42 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-12-05 01:55:38 +0100 |
commit | d5e1f536a750906af84c490fa01176d95cdb5d3a (patch) | |
tree | a81533636ed7c7ce256f3141fe44bc787588baca /libs/ardour/luascripting.cc | |
parent | 2c4a8d2d257acbbef62e491d7bd5079fc64bc19e (diff) |
Allow to pass interpreter to evaluate action-script parameters
This allows to add bindings, in particular GUI dialog, to be registered
before evaluating the parameters.
Diffstat (limited to 'libs/ardour/luascripting.cc')
-rw-r--r-- | libs/ardour/luascripting.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/ardour/luascripting.cc b/libs/ardour/luascripting.cc index 5d0b45aaf5..a3276432b2 100644 --- a/libs/ardour/luascripting.cc +++ b/libs/ardour/luascripting.cc @@ -374,9 +374,15 @@ LuaScriptParams::script_params (const LuaScriptInfoPtr& lsi, const std::string & LuaScriptParamList LuaScriptParams::script_params (const std::string& s, const std::string &pname, bool file) { + LuaState lua; + return LuaScriptParams::script_params (lua, s, pname, file); +} + +LuaScriptParamList +LuaScriptParams::script_params (LuaState& lua, const std::string& s, const std::string &pname, bool file) +{ LuaScriptParamList rv; - LuaState lua; lua_State* L = lua.getState(); lua.sandbox (true); lua.do_command ("function ardour () end"); |