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).
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user