Add Lua bindings to query all stripables
authorRobin Gareus <robin@gareus.org>
Sat, 17 Jun 2017 02:35:48 +0000 (04:35 +0200)
committerRobin Gareus <robin@gareus.org>
Sat, 17 Jun 2017 02:37:14 +0000 (04:37 +0200)
libs/ardour/ardour/session.h
libs/ardour/luabindings.cc
libs/ardour/session.cc

index dcc9e92e9e3434803351bf3e7bc66bd620275c68..bc8614be96d2fddf5052af5311ba6c04202ef45f 100644 (file)
@@ -300,6 +300,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
         */
 
        void get_stripables (StripableList&) const;
+       StripableList get_stripables () const;
        boost::shared_ptr<RouteList> get_tracks() const;
        boost::shared_ptr<RouteList> get_routes_with_internal_returns() const;
        boost::shared_ptr<RouteList> get_routes_with_regions_at (framepos_t const) const;
index 112805f3e6a1ae9d53404f3df140d99353759cf2..3cc88fa4149868f14ef73cae5cabaf061c9ea021 100644 (file)
@@ -945,6 +945,8 @@ LuaBindings::common (lua_State* L)
                .addFunction ("color", &PresentationInfo::color)
                .addFunction ("set_color", &PresentationInfo::set_color)
                .addFunction ("order", &PresentationInfo::order)
+               .addFunction ("special", &PresentationInfo::special)
+               .addFunction ("flags", &PresentationInfo::flags)
                .addConst ("max_order", ARDOUR::PresentationInfo::max_order)
                .endClass ()
 
@@ -1972,6 +1974,7 @@ LuaBindings::common (lua_State* L)
                .addFunction ("new_midi_route", &Session::new_midi_route)
                .addFunction ("get_routes", &Session::get_routes)
                .addFunction ("get_tracks", &Session::get_tracks)
+               .addFunction ("get_stripables", (StripableList (Session::*)() const)&Session::get_stripables)
                .addFunction ("name", &Session::name)
                .addFunction ("path", &Session::path)
                .addFunction ("record_status", &Session::record_status)
index 1e1289e8e6dbb7ef9d248847dbbb4c0e737596e8..cae5a5257b797d9b4007f768a205cf00fa501697 100644 (file)
@@ -4276,6 +4276,15 @@ Session::get_stripables (StripableList& sl) const
        sl.insert (sl.end(), v.begin(), v.end());
 }
 
+StripableList
+Session::get_stripables () const
+{
+       StripableList rv;
+       Session::get_stripables (rv);
+       rv.sort (Stripable::Sorter ());
+       return rv;
+}
+
 boost::shared_ptr<RouteList>
 Session::get_routes_with_internal_returns() const
 {