From e3690cf6530a6a4dd8bec893b82b517af415fbb5 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 7 Aug 2017 02:52:24 +0200 Subject: [PATCH] Add Lua Bindings to clone/copy regions --- libs/ardour/ardour/region_factory.h | 3 +++ libs/ardour/luabindings.cc | 1 + 2 files changed, 4 insertions(+) diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h index 32c5e32c0f..edfbfba6f0 100644 --- a/libs/ardour/ardour/region_factory.h +++ b/libs/ardour/ardour/region_factory.h @@ -60,6 +60,9 @@ public: /** create a "pure copy" of Region @param other */ static boost::shared_ptr create (boost::shared_ptr other, bool announce = false, bool fork = false); + static boost::shared_ptr create (boost::shared_ptr other, bool announce, bool fork) { + return create (boost::shared_ptr(other), announce, fork); + } /** create a region from a single Source */ static boost::shared_ptr create (boost::shared_ptr, diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc index e2d3bf3554..c4a34a6dcb 100644 --- a/libs/ardour/luabindings.cc +++ b/libs/ardour/luabindings.cc @@ -2025,6 +2025,7 @@ LuaBindings::common (lua_State* L) .beginClass ("RegionFactory") .addStaticFunction ("region_by_id", &RegionFactory::region_by_id) .addStaticFunction ("regions", &RegionFactory::regions) + .addStaticFunction ("clone_region", static_cast (*)(boost::shared_ptr, bool, bool)>(&RegionFactory::create)) .endClass () /* session enums (rt-safe, common) */