diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-02-09 03:02:22 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-02-09 03:02:22 +0300 |
commit | d359edbc8404d6170534ce56d25c91865f5cec05 (patch) | |
tree | bb01f2fd030b04182a8ddb4160ee7486ba7b1196 /source/blender/editors | |
parent | bc31b2c0f44ababb3120223b968dee872cec24f6 (diff) |
Bugfix: Inserting keyframes from the buttons now ensures that the Graph Editor is updated in the process...
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/keyframes_edit.c | 10 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 10 |
2 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 718286b4ba4..6957f4e572d 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -97,7 +97,7 @@ short ANIM_fcurve_keys_bezier_loop(BeztEditData *bed, FCurve *fcu, BeztEditFunc return 0; /* set the F-Curve into the editdata so that it can be accessed */ - if(bed) { + if (bed) { bed->fcu= fcu; bed->curIndex= 0; } @@ -109,8 +109,9 @@ short ANIM_fcurve_keys_bezier_loop(BeztEditData *bed, FCurve *fcu, BeztEditFunc */ if (bezt_ok) { for (bezt=fcu->bezt, i=0; i < fcu->totvert; bezt++, i++) { + if (bed) bed->curIndex= i; + /* Only operate on this BezTriple if it fullfills the criteria of the validation func */ - if(bed) bed->curIndex= i; if (bezt_ok(bed, bezt)) { /* Exit with return-code '1' if function returns positive * This is useful if finding if some BezTriple satisfies a condition. @@ -121,17 +122,18 @@ short ANIM_fcurve_keys_bezier_loop(BeztEditData *bed, FCurve *fcu, BeztEditFunc } else { for (bezt=fcu->bezt, i=0; i < fcu->totvert; bezt++, i++) { + if (bed) bed->curIndex= i; + /* Exit with return-code '1' if function returns positive * This is useful if finding if some BezTriple satisfies a condition. */ - if(bed) bed->curIndex= i; if (bezt_cb(bed, bezt)) return 1; } } } /* unset the F-Curve from the editdata now that it's done */ - if(bed) { + if (bed) { bed->fcu= NULL; bed->curIndex= 0; } diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 7a3e6dc5814..f44b45baf50 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1427,8 +1427,8 @@ static int insert_key_button_exec (bContext *C, wmOperator *op) /* send updates */ DAG_ids_flush_update(0); - /* for now, only send ND_KEYS for KeyingSets */ - WM_event_add_notifier(C, ND_KEYS, NULL); + /* send notifiers that keyframes have been changed */ + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); } return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; @@ -1493,12 +1493,12 @@ static int delete_key_button_exec (bContext *C, wmOperator *op) } - if(success) { + if (success) { /* send updates */ DAG_ids_flush_update(0); - /* for now, only send ND_KEYS for KeyingSets */ - WM_event_add_notifier(C, ND_KEYS, NULL); + /* send notifiers that keyframes have been changed */ + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); } return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; |