From 40c9e735d71b231b4655ee68d9abced49acf17c8 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Sat, 3 Aug 2024 17:29:01 +0100 Subject: [PATCH] Node: Expose .graph property --- source/src/python/node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/src/python/node.cpp b/source/src/python/node.cpp index 3adc9927..75ac7f15 100644 --- a/source/src/python/node.cpp +++ b/source/src/python/node.cpp @@ -287,7 +287,8 @@ void init_python_node(py::module &m) .def_property_readonly( "is_playing", [](NodeRef node) { return node->get_graph()->is_playing(node); }, R"pbdoc(Query whether the node is currently playing)pbdoc") .def( - "stop", [](NodeRef node) { node->get_graph()->stop(node); }, R"pbdoc(Stop playing the node by disconnecting it from the graph's output)pbdoc"); + "stop", [](NodeRef node) { node->get_graph()->stop(node); }, R"pbdoc(Stop playing the node by disconnecting it from the graph's output)pbdoc") + .def_property_readonly("graph", &Node::get_graph, R"pbdoc(The AudioGraph that the node is part of.)pbdoc"); /*-------------------------------------------------------------------------------- * StochasticNode