Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2010-03-17 14:34:27 +0300
committerJoshua Leung <aligorith@gmail.com>2010-03-17 14:34:27 +0300
commitbe3d5f9d5df90737c01338266efd72b3367b9e6c (patch)
treeafb137909b69c50ad3538b4e7de2fc3195d4eff0 /source
parent1d4b93214520045e67eb535393d6056f41feaa54 (diff)
PyKeyingSet Bugfixes:
* With multiple objects selected, only one of the objects got keyframed. The code which was checking for duplicate paths was wrongly assuming to ignore the ID-block used still. * Not registering a Keying Set as 'builtin' would crash on startup. I've made all Keying Sets fallback to adding as if they were local for now, but a better solution is coming soon. * Fixed a typo in RNA function wrappers for the generator callback, since it was looking for the iterator only. This doesn't seem to have caused any problems (thankfully).
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c10
-rw-r--r--source/blender/editors/animation/keyingsets.c6
-rw-r--r--source/blender/makesrna/intern/rna_animation.c2
3 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 307ed1bfcd4..31743a6bd1a 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -557,15 +557,9 @@ KS_Path *BKE_keyingset_find_path (KeyingSet *ks, ID *id, const char group_name[]
KS_Path *ksp;
/* sanity checks */
- if ELEM(NULL, ks, rna_path)
+ if ELEM3(NULL, ks, rna_path, id)
return NULL;
- /* ID is optional for relative KeyingSets, but is necessary for absolute KeyingSets */
- if (id == NULL) {
- if (ks->flag & KEYINGSET_ABSOLUTE)
- return NULL;
- }
-
/* loop over paths in the current KeyingSet, finding the first one where all settings match
* (i.e. the first one where none of the checks fail and equal 0)
*/
@@ -573,7 +567,7 @@ KS_Path *BKE_keyingset_find_path (KeyingSet *ks, ID *id, const char group_name[]
short eq_id=1, eq_path=1, eq_index=1, eq_group=1;
/* id */
- if ((ks->flag & KEYINGSET_ABSOLUTE) && (id != ksp->id))
+ if (id != ksp->id)
eq_id= 0;
/* path */
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 1e4180a3ae7..b1f1cbbea1e 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -526,10 +526,10 @@ void ANIM_keyingset_info_register (const bContext *C, KeyingSetInfo *ksi)
KeyingSet *ks;
/* determine the KeyingSet list to include the new KeyingSet in */
- if (ksi->builtin)
- list = &builtin_keyingsets;
- else
+ if (ksi->builtin==0 && scene)
list = &scene->keyingsets;
+ else
+ list = &builtin_keyingsets;
/* create a new KeyingSet
* - inherit name and keyframing settings from the typeinfo
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index e048a79daf8..27f0dc5eafb 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -124,7 +124,7 @@ static void RKS_GEN_rna_internal(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks,
FunctionRNA *func;
RNA_pointer_create(NULL, ksi->ext.srna, ksi, &ptr);
- func= RNA_struct_find_function(&ptr, "iterator");
+ func= RNA_struct_find_function(&ptr, "generate");
RNA_parameter_list_create(&list, &ptr, func);
/* hook up arguments */