diff options
author | David Robillard <d@drobilla.net> | 2009-05-11 18:05:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-05-11 18:05:24 +0000 |
commit | 698c38587bd4f0133a132dc363098ff8298ec47b (patch) | |
tree | abcab2ab196d995fbcc52a4e62c4f5d496b6a754 /src/engine/ObjectSender.cpp | |
parent | 9ea901df533b0326e715ced10b9e9970239da515 (diff) | |
download | ingen-698c38587bd4f0133a132dc363098ff8298ec47b.tar.gz ingen-698c38587bd4f0133a132dc363098ff8298ec47b.tar.bz2 ingen-698c38587bd4f0133a132dc363098ff8298ec47b.zip |
* New ontology.
* Display human names on patch ports on creation, if enabled.
* Fix copy/paste of subpatches.
* Split properties into "properties" (class properties) and "variables" (instance properties).
* Names are kind of a legacy leftover...
* Remove special set poly / enable / etc events in favour of just setting properties (less API, extensible, RDF compatible).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1973 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/ObjectSender.cpp')
-rw-r--r-- | src/engine/ObjectSender.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/engine/ObjectSender.cpp b/src/engine/ObjectSender.cpp index 81759fae..e261bc97 100644 --- a/src/engine/ObjectSender.cpp +++ b/src/engine/ObjectSender.cpp @@ -62,14 +62,14 @@ ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool r client->transfer_begin(); client->new_patch(patch->path(), patch->internal_polyphony()); - client->set_property(patch->path(), "ingen:polyphonic", patch->polyphonic()); + client->set_variable(patch->path(), "ingen:polyphonic", bool(patch->polyphonic())); // Send variable - const GraphObjectImpl::Variables& data = patch->variables(); - for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j) + const GraphObjectImpl::Properties& data = patch->variables(); + for (GraphObjectImpl::Properties::const_iterator j = data.begin(); j != data.end(); ++j) client->set_variable(patch->path(), (*j).first, (*j).second); - client->set_property(patch->path(), "ingen:enabled", (bool)patch->enabled()); + client->set_variable(patch->path(), "ingen:enabled", (bool)patch->enabled()); if (recursive) { @@ -119,11 +119,11 @@ ObjectSender::send_node(ClientInterface* client, const NodeImpl* node, bool recu client->transfer_begin(); client->new_node(node->path(), node->plugin()->uri()); - client->set_property(node->path(), "ingen:polyphonic", node->polyphonic()); + client->set_variable(node->path(), "ingen:polyphonic", bool(node->polyphonic())); // Send variables - const GraphObjectImpl::Variables& data = node->variables(); - for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j) + const GraphObjectImpl::Properties& data = node->variables(); + for (GraphObjectImpl::Properties::const_iterator j = data.begin(); j != data.end(); ++j) client->set_variable(node->path(), (*j).first, (*j).second); // Send properties @@ -151,11 +151,13 @@ ObjectSender::send_port(ClientInterface* client, const PortImpl* port, bool bund client->bundle_begin(); client->new_port(port->path(), port->type().uri(), port->index(), port->is_output()); - client->set_property(port->path(), "ingen:polyphonic", port->polyphonic()); + PatchImpl* graph_parent = dynamic_cast<PatchImpl*>(port->parent_node()); + if (graph_parent && graph_parent->internal_polyphony() > 1) + client->set_variable(port->path(), "ingen:polyphonic", bool(port->polyphonic())); // Send variable - const GraphObjectImpl::Variables& data = port->variables(); - for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j) + const GraphObjectImpl::Properties& data = port->variables(); + for (GraphObjectImpl::Properties::const_iterator j = data.begin(); j != data.end(); ++j) client->set_variable(port->path(), (*j).first, (*j).second); // Send properties |