diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-03-18 10:53:46 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-03-18 10:53:46 +0300 |
commit | 9ebde542ece4ce13c4f8375e879a6c497b4da3f7 (patch) | |
tree | 1b1f40f42372141f3220ada94ea1992ac3e49ac9 /source/blender/editors | |
parent | 3566400dc53bcb2d07b760775d607330e3ea5d54 (diff) |
Bugfix: Autokeying was non-functional after the Keying Sets refactor
- The RNA wrapping for the generate callback was still wrong, with the primary effect being that C-code calling this had unexpected consequences that were hard to debug.
- Fixed some defective checks that meant that when specifying the RNA-pointers for the Keying Set to use (rather than using the Keying Set's own iterator callback) would never add any info.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/keyingsets.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index b1f1cbbea1e..a93220aeb67 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -662,11 +662,14 @@ void ANIM_relative_keyingset_add_source (ListBase *dsources, ID *id, StructRNA * tRKS_DSource *ds; /* sanity checks - * we must have at least one valid data pointer to use + * - we must have somewhere to output the data + * - we must have both srna+data (and with id too optionally), or id by itself only */ - if (ELEM(NULL, dsources, srna) || ((id == data) && (id == NULL))) + if (dsources == NULL) return; - + if (ELEM(NULL, srna, data) && (id == NULL)) + return; + /* allocate new elem, and add to the list */ ds = MEM_callocN(sizeof(tRKS_DSource), "tRKS_DSource"); BLI_addtail(dsources, ds); |