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
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-10-08 09:53:26 +0400
committerJoshua Leung <aligorith@gmail.com>2009-10-08 09:53:26 +0400
commit6e43a69a8d3dc88594df6f0d15686cad8e7e6646 (patch)
tree5cf4565bb35e7e3165fcfbfddaa798324a3b4435 /source/blender/editors/animation/keyingsets.c
parentb4b031eae7569d5e08f034368417417d10da3a60 (diff)
Bugfix #19576: Auto keyframing does not record rotations on object level animation
The hardcoded paths for rotation keyframes on objects got broken by my commits to rename the rotation properties. I've taken this opportunity to recode the auto-keyframing code here to use the builtin keyingsets instead of going through and manually calling insert_keyframe(), thus preventing this problem in future.
Diffstat (limited to 'source/blender/editors/animation/keyingsets.c')
-rw-r--r--source/blender/editors/animation/keyingsets.c27
1 files changed, 5 insertions, 22 deletions
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 99cdf0a86f4..a9a3612b79b 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -1252,9 +1252,8 @@ short modifykey_get_context_data (bContext *C, ListBase *dsources, KeyingSet *ks
* by the KeyingSet. This takes into account many of the different combinations of using KeyingSets.
* Returns the number of channels that keyframes were added to
*/
-int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra)
+int modify_keyframes (Scene *scene, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra)
{
- Scene *scene= CTX_data_scene(C);
KS_Path *ksp;
int kflag=0, success= 0;
char *groupname= NULL;
@@ -1319,24 +1318,16 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
success+= delete_keyframe(ksp->id, act, groupname, ksp->rna_path, i, cfra, kflag);
}
- /* send notifiers and set recalc-flags */
- // TODO: hopefully this doesn't result in execessive flooding of the notifier stack
- if (C && ksp->id) {
+ /* set recalc-flags */
+ if (ksp->id) {
switch (GS(ksp->id->name)) {
case ID_OB: /* Object (or Object-Related) Keyframes */
{
Object *ob= (Object *)ksp->id;
ob->recalc |= OB_RECALC;
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, ksp->id);
}
break;
- case ID_MA: /* Material Keyframes */
- WM_event_add_notifier(C, NC_MATERIAL|ND_KEYS, ksp->id);
- break;
- default: /* Any keyframes */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
- break;
}
}
}
@@ -1457,24 +1448,16 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
MEM_freeN(path);
}
- /* send notifiers and set recalc-flags */
- // TODO: hopefully this doesn't result in execessive flooding of the notifier stack
- if (C && cks->id) {
+ /* set recalc-flags */
+ if (cks->id) {
switch (GS(cks->id->name)) {
case ID_OB: /* Object (or Object-Related) Keyframes */
{
Object *ob= (Object *)cks->id;
ob->recalc |= OB_RECALC;
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, cks->id);
}
break;
- case ID_MA: /* Material Keyframes */
- WM_event_add_notifier(C, NC_MATERIAL|ND_KEYS, cks->id);
- break;
- default: /* Any keyframes */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
- break;
}
}
}