Add Lua Bindings to clone/copy regions

This commit is contained in:
Robin Gareus
2017-08-07 02:52:24 +02:00
parent 771a4a4e0c
commit e3690cf653
2 changed files with 4 additions and 0 deletions

View File

@@ -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>,

View File

@@ -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) */