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
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2010-02-09 03:02:22 +0300
committerJoshua Leung <aligorith@gmail.com>2010-02-09 03:02:22 +0300
commitd359edbc8404d6170534ce56d25c91865f5cec05 (patch)
treebb01f2fd030b04182a8ddb4160ee7486ba7b1196 /source
parentbc31b2c0f44ababb3120223b968dee872cec24f6 (diff)
Bugfix: Inserting keyframes from the buttons now ensures that the Graph Editor is updated in the process...
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/constraint.c13
-rw-r--r--source/blender/editors/animation/keyframes_edit.c10
-rw-r--r--source/blender/editors/animation/keyframing.c10
3 files changed, 18 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 4f4c1959f34..f0a2120f0a7 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -4041,9 +4041,10 @@ void id_loop_constraints (ListBase *conlist, ConstraintIDFunc func, void *userda
/* ......... */
+/* helper for copy_constraints(), to be used for making sure that ID's are valid */
static void con_extern_cb(bConstraint *con, ID **idpoin, void *userdata)
{
- if(idpoin && (*idpoin)->lib)
+ if (idpoin && (*idpoin)->lib)
id_lib_extern(*idpoin);
}
@@ -4066,13 +4067,13 @@ void copy_constraints (ListBase *dst, const ListBase *src)
/* only do specific constraints if required */
if (cti) {
- if (cti->copy_data) {
+ /* perform custom copying operations if needed */
+ if (cti->copy_data)
cti->copy_data(con, srccon);
- }
-
- if(cti->id_looper) {
+
+ /* go over used ID-links for this constraint to ensure that they are valid for proxies */
+ if (cti->id_looper)
cti->id_looper(con, con_extern_cb, NULL);
- }
}
}
}
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;