mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Lua: add arguments to trigger_script_by_name
This commit is contained in:
parent
817fccb3e5
commit
3387d127e7
3 changed files with 6 additions and 2 deletions
|
|
@ -712,7 +712,7 @@ private:
|
||||||
gint really_remove_region_marker (ArdourMarker*);
|
gint really_remove_region_marker (ArdourMarker*);
|
||||||
void goto_nth_marker (int nth);
|
void goto_nth_marker (int nth);
|
||||||
void trigger_script (int nth);
|
void trigger_script (int nth);
|
||||||
void trigger_script_by_name (const std::string script_name);
|
void trigger_script_by_name (const std::string script_name, const std::string args = "");
|
||||||
void toggle_marker_lines ();
|
void toggle_marker_lines ();
|
||||||
void set_marker_line_visibility (bool);
|
void set_marker_line_visibility (bool);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -873,7 +873,7 @@ static void _lua_print (std::string s) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::trigger_script_by_name (const std::string script_name)
|
Editor::trigger_script_by_name (const std::string script_name, const std::string in_args)
|
||||||
{
|
{
|
||||||
string script_path;
|
string script_path;
|
||||||
ARDOUR::LuaScriptList scr = LuaScripting::instance ().scripts(LuaScriptInfo::EditorAction);
|
ARDOUR::LuaScriptList scr = LuaScripting::instance ().scripts(LuaScriptInfo::EditorAction);
|
||||||
|
|
@ -901,6 +901,8 @@ Editor::trigger_script_by_name (const std::string script_name)
|
||||||
lua.do_file (script_path);
|
lua.do_file (script_path);
|
||||||
luabridge::LuaRef args (luabridge::newTable (L));
|
luabridge::LuaRef args (luabridge::newTable (L));
|
||||||
|
|
||||||
|
args[1] = in_args;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
luabridge::LuaRef fn = luabridge::getGlobal (L, "factory");
|
luabridge::LuaRef fn = luabridge::getGlobal (L, "factory");
|
||||||
if (fn.isFunction()) {
|
if (fn.isFunction()) {
|
||||||
|
|
|
||||||
|
|
@ -400,6 +400,8 @@ public:
|
||||||
virtual void set_video_timeline_height (const int h) = 0;
|
virtual void set_video_timeline_height (const int h) = 0;
|
||||||
virtual void embed_audio_from_video (std::string, samplepos_t n = 0, bool lock_position_to_video = true) = 0;
|
virtual void embed_audio_from_video (std::string, samplepos_t n = 0, bool lock_position_to_video = true) = 0;
|
||||||
|
|
||||||
|
virtual void trigger_script_by_name (const std::string script_name, const std::string args = "") = 0;
|
||||||
|
|
||||||
virtual bool track_selection_change_without_scroll () const = 0;
|
virtual bool track_selection_change_without_scroll () const = 0;
|
||||||
virtual bool show_touched_automation () const = 0;
|
virtual bool show_touched_automation () const = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue