mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
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.
This commit is contained in:
parent
2c4a8d2d25
commit
d5e1f536a7
2 changed files with 10 additions and 1 deletions
|
|
@ -19,6 +19,8 @@
|
|||
#ifndef _ardour_lua_script_params_h_
|
||||
#define _ardour_lua_script_params_h_
|
||||
|
||||
#include "lua/luastate.h"
|
||||
|
||||
#include "ardour/libardour_visibility.h"
|
||||
#include "ardour/luascripting.h"
|
||||
|
||||
|
|
@ -38,6 +40,7 @@ namespace ARDOUR { namespace LuaScriptParams {
|
|||
|
||||
LIBARDOUR_API LuaScriptParamList script_params (const LuaScriptInfoPtr&, const std::string &);
|
||||
LIBARDOUR_API LuaScriptParamList script_params (const std::string &, const std::string &, bool file=true);
|
||||
LIBARDOUR_API LuaScriptParamList script_params (LuaState&, const std::string &, const std::string &, bool file=true);
|
||||
LIBARDOUR_API void params_to_ref (luabridge::LuaRef *tbl_args, const LuaScriptParamList&);
|
||||
LIBARDOUR_API void ref_to_params (LuaScriptParamList&, luabridge::LuaRef *tbl_args);
|
||||
|
||||
|
|
|
|||
|
|
@ -373,10 +373,16 @@ 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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue