diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-08-25 04:12:11 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-08-25 04:12:11 +0400 |
commit | 4a78b9e9046567e86ed3ccada83a50c43684facd (patch) | |
tree | 405a3569ffe5d0477dfce4c2bcaded918574e240 /source/blender/editors/transform/transform_generics.c | |
parent | 8ed64f785491c10467e83584caecc13ec5199aaf (diff) |
2.5 - Assorted Bugfixes for Animation Editing
* Inserting keyframes now takes into account whether the F-Curve was editable or not.
* Editing keyframes in animation editors now sends proper depsgraph updates instead of just tagging the relevant objects.
Thanks JiriH for reporting these bugs.
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 168a65a2e75..edcbd858e37 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -269,7 +269,7 @@ static void editmesh_apply_to_mirror(TransInfo *t) /* tags the given ID block for refreshes (if applicable) due to * Animation Editor editing */ -static void animedit_refresh_id_tags (ID *id) +static void animedit_refresh_id_tags (Scene *scene, ID *id) { if (id) { AnimData *adt= BKE_animdata_from_id(id); @@ -279,12 +279,11 @@ static void animedit_refresh_id_tags (ID *id) adt->recalc |= ADT_RECALC_ANIM; /* if ID-block is Object, set recalc flags */ - // TODO: this should probably go through the depsgraph instead... but for now, let's be lazy switch (GS(id->name)) { case ID_OB: { Object *ob= (Object *)id; - ob->recalc |= OB_RECALC; + DAG_object_flush_update(scene, ob, OB_RECALC_DATA); /* sets recalc flags */ } break; } @@ -384,7 +383,7 @@ void recalcData(TransInfo *t) /* just tag these animdata-blocks to recalc, assuming that some data there changed */ for (ale= anim_data.first; ale; ale= ale->next) { /* set refresh tags for objects using this animation */ - animedit_refresh_id_tags(ale->id); + animedit_refresh_id_tags(t->scene, ale->id); } /* now free temp channels */ @@ -432,7 +431,7 @@ void recalcData(TransInfo *t) calchandles_fcurve(fcu); /* set refresh tags for objects using this animation */ - animedit_refresh_id_tags(ale->id); + animedit_refresh_id_tags(t->scene, ale->id); } /* do resort and other updates? */ @@ -463,7 +462,7 @@ void recalcData(TransInfo *t) continue; /* set refresh tags for objects using this animation */ - animedit_refresh_id_tags(tdn->id); + animedit_refresh_id_tags(t->scene, tdn->id); /* if cancelling transform, just write the values without validating, then move on */ if (t->state == TRANS_CANCEL) { |