diff options
author | David Robillard <d@drobilla.net> | 2013-01-26 21:22:47 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-01-26 21:22:47 +0000 |
commit | 30521a822ee16b0945370543267f155b710c594b (patch) | |
tree | fbd62c08b71d4fee4b3f3ab5276248cb078394bf | |
parent | a0ce6e18af34a8597e6fe0bc39d1f31737e7ef01 (diff) | |
download | lilv-30521a822ee16b0945370543267f155b710c594b.tar.gz lilv-30521a822ee16b0945370543267f155b710c594b.tar.bz2 lilv-30521a822ee16b0945370543267f155b710c594b.zip |
Support state:loadDefaultState.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5007 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | src/state.c | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -3,6 +3,8 @@ lilv (0.15.0) unstable; * Add lilv_world_ask() for simply checking if a statement exists * Add lilv_nodes_merge() * Make lilv_plugin_get_port_by_designation() return a const pointer + * Make state loading functions fall back to lv2:default for port values, + so a plugin description can be loaded as default state. * Support atom:supports in lilv_port_supports_event() * Add va_list variant of lilv_plugin_get_num_ports_of_class() * Fix several plugin functions that failed to load data if called first @@ -12,7 +14,7 @@ lilv (0.15.0) unstable; * lilvmm.hpp: Add several missing methods * Update to waf 1.7.8 and autowaf r90 (install docs to versioned directory) - -- David Robillard <d@drobilla.net> Sun, 13 Jan 2013 19:32:49 -0500 + -- David Robillard <d@drobilla.net> Sat, 26 Jan 2013 16:17:52 -0500 lilv (0.14.4) stable; diff --git a/src/state.c b/src/state.c index 5b7b64b..081aaf0 100644 --- a/src/state.c +++ b/src/state.c @@ -494,6 +494,9 @@ new_state_from_model(LilvWorld* world, const SordNode* label = get1(model, port, world->uris.rdfs_label); const SordNode* symbol = get1(model, port, world->uris.lv2_symbol); const SordNode* value = get1(model, port, world->uris.pset_value); + if (!value) { + value = get1(model, port, world->uris.lv2_default); + } if (!symbol) { LILV_ERRORF("State `%s' port missing symbol.\n", sord_node_get_string(node)); |