diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-03-08 18:04:06 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-03-08 18:04:06 +0400 |
commit | a80b7d612947e1d26b10165a37bb603dae527afd (patch) | |
tree | 7a575b2f99b093e43d50d9322f8d1c50477b0fa6 /source/blender/blenloader | |
parent | a5f2db9992327764126ee7f275294d1f0699a26a (diff) |
Fixing several issues with keyingsets:
*Add a new idname to keyingsets, keeping name as label-only (using same string for both made lookup fail when using i18n other than english, as it tried to compare an untranslated static string id against a translated RNA name). Also adding a description string (can be helpful with custom keyingsets, imho).
*Fixed a few other bugs related to that area (namely, you can’t deselect current keyingset from the shift-ctrl-alt-I popup menu, and insert/delete key ops were using a rather strange way to get chosen custom keyingset…).
*Fixed UI code so that it always uses (RNA) enum, and simplified menu-creation code.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 79613f0f8f9..5509fc3dd85 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -13245,6 +13245,20 @@ static void do_versions(FileData *fd, Library *lib, Main *main) do_versions_nodetree_multi_file_output_format_2_62_1(NULL, ntree); } + /* put compatibility code here until next subversion bump */ + { + { + /* Set new idname of keyingsets from their now "label-only" name. */ + Scene *scene; + for (scene = main->scene.first; scene; scene = scene->id.next) { + KeyingSet *ks; + for (ks = scene->keyingsets.first; ks; ks = ks->next) { + if (!ks->idname[0]) + BLI_strncpy(ks->idname, ks->name, sizeof(ks->idname)); + } + } + } + } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */ |