diff options
author | David Robillard <d@drobilla.net> | 2011-02-19 05:10:29 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-19 05:10:29 +0000 |
commit | 6b18de71d1c603255b263a64434005306f152f13 (patch) | |
tree | 09c6e87acca1fe76bc74b3b549fee7ad09751993 /src/engine/Engine.cpp | |
parent | 8e07e115429a0869593d4f29dc3e6cf5c8b25049 (diff) | |
download | ingen-6b18de71d1c603255b263a64434005306f152f13.tar.gz ingen-6b18de71d1c603255b263a64434005306f152f13.tar.bz2 ingen-6b18de71d1c603255b263a64434005306f152f13.zip |
Save/load patches as nested bundles (fix ticket #520).
Sane (context-based, ala RDF quads) approach to the problem of externally visible / internally visible properties.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2993 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/Engine.cpp')
-rw-r--r-- | src/engine/Engine.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp index 8e0d7e0e..12c479f5 100644 --- a/src/engine/Engine.cpp +++ b/src/engine/Engine.cpp @@ -179,9 +179,11 @@ Engine::activate() PatchImpl* root_patch = _driver->root_patch(); if (!root_patch) { root_patch = new PatchImpl(*this, "root", 1, NULL, _driver->sample_rate(), 1); - root_patch->meta().set_property(uris.rdf_type, uris.ingen_Patch); - root_patch->meta().set_property(uris.ingen_polyphony, Raul::Atom(int32_t(1))); - root_patch->set_property(uris.rdf_type, uris.ingen_Node); + root_patch->set_property(uris.rdf_type, + Resource::Property(uris.ingen_Patch, Resource::INTERNAL)); + root_patch->set_property(uris.ingen_polyphony, + Resource::Property(Raul::Atom(int32_t(1)), + Resource::INTERNAL)); root_patch->activate(*_buffer_factory); _world->store()->add(root_patch); root_patch->compiled_patch(root_patch->compile()); @@ -197,8 +199,10 @@ Engine::activate() Shared::Resource::Properties in_properties(control_properties); in_properties.insert(make_pair(uris.rdf_type, uris.lv2_InputPort)); in_properties.insert(make_pair(uris.lv2_index, 0)); - in_properties.insert(make_pair(uris.ingenui_canvas_x, 32.0f)); - in_properties.insert(make_pair(uris.ingenui_canvas_y, 32.0f)); + in_properties.insert(make_pair(uris.ingenui_canvas_x, + Resource::Property(32.0f, Resource::EXTERNAL))); + in_properties.insert(make_pair(uris.ingenui_canvas_y, + Resource::Property(32.0f, Resource::EXTERNAL))); execute_and_delete_event(context, new Events::CreatePort( *this, SharedPtr<Request>(), 0, @@ -208,8 +212,10 @@ Engine::activate() Shared::Resource::Properties out_properties(control_properties); out_properties.insert(make_pair(uris.rdf_type, uris.lv2_OutputPort)); out_properties.insert(make_pair(uris.lv2_index, 1)); - out_properties.insert(make_pair(uris.ingenui_canvas_x, 128.0f)); - out_properties.insert(make_pair(uris.ingenui_canvas_y, 32.0f)); + out_properties.insert(make_pair(uris.ingenui_canvas_x, + Resource::Property(128.0f, Resource::EXTERNAL))); + out_properties.insert(make_pair(uris.ingenui_canvas_y, + Resource::Property(32.0f, Resource::EXTERNAL))); execute_and_delete_event(context, new Events::CreatePort( *this, SharedPtr<Request>(), 0, |