diff options
Diffstat (limited to 'source/blender/editors/animation/keyingsets.c')
-rw-r--r-- | source/blender/editors/animation/keyingsets.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 1c06266a148..301111d22fd 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -43,6 +43,7 @@ #include "DNA_constraint_types.h" #include "DNA_scene_types.h" +#include "BKE_main.h" #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_context.h" @@ -589,7 +590,7 @@ void ANIM_keyingset_info_register (const bContext *C, KeyingSetInfo *ksi) /* Remove the given KeyingSetInfo from the list of type infos, and also remove the builtin set if appropriate */ void ANIM_keyingset_info_unregister (const bContext *C, KeyingSetInfo *ksi) { - Scene *scene = CTX_data_scene(C); + Main *bmain= CTX_data_main(C); KeyingSet *ks, *ksn; /* find relevant builtin KeyingSets which use this, and remove them */ @@ -600,8 +601,14 @@ void ANIM_keyingset_info_unregister (const bContext *C, KeyingSetInfo *ksi) /* remove if matching typeinfo name */ if (strcmp(ks->typeinfo, ksi->idname) == 0) { + Scene *scene; BKE_keyingset_free(ks); - BLI_freelinkN(&scene->keyingsets, ks); + BLI_remlink(&builtin_keyingsets, ks); + + for(scene= bmain->scene.first; scene; scene= scene->id.next) + BLI_remlink_safe(&scene->keyingsets, ks); + + MEM_freeN(ks); } } |