summaryrefslogtreecommitdiffstats
path: root/src/engine/events/CreateNodeEvent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/events/CreateNodeEvent.cpp')
-rw-r--r--src/engine/events/CreateNodeEvent.cpp14
1 files changed, 12 insertions, 2 deletions
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> responder, SampleCount timestamp, const Path& path, const URI& plugin_uri, bool polyphonic)
+using namespace Shared;
+
+CreateNodeEvent::CreateNodeEvent(
+ Engine& engine,
+ SharedPtr<Responder> 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> 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();