From c11ecf0fd10641218326ae384e80413ba3cdf46c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 27 May 2009 17:42:51 +0000 Subject: Remove 'new_patch', 'new_node', and 'new_port' from interface in favour of generic 'put'. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2011 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/events/CreateNodeEvent.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/engine/events/CreateNodeEvent.cpp') diff --git a/src/engine/events/CreateNodeEvent.cpp b/src/engine/events/CreateNodeEvent.cpp index fea858f1..6f3ed834 100644 --- a/src/engine/events/CreateNodeEvent.cpp +++ b/src/engine/events/CreateNodeEvent.cpp @@ -38,8 +38,16 @@ using namespace Raul; namespace Ingen { - -CreateNodeEvent::CreateNodeEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const Path& path, const URI& plugin_uri, bool polyphonic) +using namespace Shared; + +CreateNodeEvent::CreateNodeEvent( + Engine& engine, + SharedPtr responder, + SampleCount timestamp, + const Path& path, + const URI& plugin_uri, + bool polyphonic, + const Resource::Properties& properties) : QueuedEvent(engine, responder, timestamp) , _path(path) , _plugin_uri(plugin_uri) @@ -48,6 +56,7 @@ CreateNodeEvent::CreateNodeEvent(Engine& engine, SharedPtr responder, , _node(NULL) , _compiled_patch(NULL) , _node_already_exists(false) + , _properties(properties) { string uri = _plugin_uri.str(); if (uri.substr(0, 3) == "om:") { @@ -80,6 +89,7 @@ CreateNodeEvent::pre_process() if (_patch && plugin) { _node = plugin->instantiate(_path.name(), _polyphonic, _patch, _engine); + _node->variables().insert(_properties.begin(), _properties.end()); if (_node != NULL) { _node->activate(); -- cgit v1.2.1