diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-07 02:52:24 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-07 03:08:36 +0200 |
commit | e3690cf6530a6a4dd8bec893b82b517af415fbb5 (patch) | |
tree | 30470b3b5ffd603c7ff3672ae44a5c7a1de0dbe8 /libs | |
parent | 771a4a4e0c9b6653083f44081a81964c802eb549 (diff) |
Add Lua Bindings to clone/copy regions
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/region_factory.h | 3 | ||||
-rw-r--r-- | libs/ardour/luabindings.cc | 1 |
2 files changed, 4 insertions, 0 deletions
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<Region> create (boost::shared_ptr<const Region> other, bool announce = false, bool fork = false); + static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, bool announce, bool fork) { + return create (boost::shared_ptr<const Region>(other), announce, fork); + } /** create a region from a single Source */ static boost::shared_ptr<Region> create (boost::shared_ptr<Source>, 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> ("RegionFactory") .addStaticFunction ("region_by_id", &RegionFactory::region_by_id) .addStaticFunction ("regions", &RegionFactory::regions) + .addStaticFunction ("clone_region", static_cast<boost::shared_ptr<Region> (*)(boost::shared_ptr<Region>, bool, bool)>(&RegionFactory::create)) .endClass () /* session enums (rt-safe, common) */ |