diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-12-19 14:45:46 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-12-19 14:45:46 +0300 |
commit | c752ec9fc458f6fd1fc0ae7a156d33bf86e73eff (patch) | |
tree | 8f559ef2cd1ce8a1c4ccee72096f34b1caf3c46f /source/blender/blenkernel/intern/key.c | |
parent | 242695011e71a358f466d4f78df3b9c66d739a64 (diff) |
2.5
Merged 'backend' changes from AnimSys2. Many of these changes are necessary for the Dopesheet and other changes I'm currently still stabilising. Those will come in due course.
Diffstat (limited to 'source/blender/blenkernel/intern/key.c')
-rw-r--r-- | source/blender/blenkernel/intern/key.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index a34da4377b1..5540a262a1d 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -59,6 +59,7 @@ #include "BLI_blenlib.h" + #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -1404,3 +1405,18 @@ KeyBlock *key_get_keyblock(Key *key, int index) return NULL; } + +/* get the appropriate KeyBlock given a name to search for */ +KeyBlock *key_get_named_keyblock(Key *key, const char name[]) +{ + KeyBlock *kb; + + if (key && name) { + for (kb= key->block.first; kb; kb= kb->next) { + if (strcmp(name, kb->name)==0) + return kb; + } + } + + return NULL; +} |