[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26726] trunk/blender/source/blender: Bugfix: Inserting keyframes from the buttons now ensures that the Graph Editor is updated in the process ...
Joshua Leung
aligorith at gmail.com
Tue Feb 9 01:02:22 CET 2010
Revision: 26726
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26726
Author: aligorith
Date: 2010-02-09 01:02:22 +0100 (Tue, 09 Feb 2010)
Log Message:
-----------
Bugfix: Inserting keyframes from the buttons now ensures that the Graph Editor is updated in the process...
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/constraint.c
trunk/blender/source/blender/editors/animation/keyframes_edit.c
trunk/blender/source/blender/editors/animation/keyframing.c
Modified: trunk/blender/source/blender/blenkernel/intern/constraint.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/constraint.c 2010-02-08 23:07:53 UTC (rev 26725)
+++ trunk/blender/source/blender/blenkernel/intern/constraint.c 2010-02-09 00:02:22 UTC (rev 26726)
@@ -4041,9 +4041,10 @@
/* ......... */
+/* 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 @@
/* 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);
- }
}
}
}
Modified: trunk/blender/source/blender/editors/animation/keyframes_edit.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframes_edit.c 2010-02-08 23:07:53 UTC (rev 26725)
+++ trunk/blender/source/blender/editors/animation/keyframes_edit.c 2010-02-09 00:02:22 UTC (rev 26726)
@@ -97,7 +97,7 @@
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 @@
*/
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 @@
}
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;
}
Modified: trunk/blender/source/blender/editors/animation/keyframing.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframing.c 2010-02-08 23:07:53 UTC (rev 26725)
+++ trunk/blender/source/blender/editors/animation/keyframing.c 2010-02-09 00:02:22 UTC (rev 26726)
@@ -1427,8 +1427,8 @@
/* 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 @@
}
- 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;
More information about the Bf-blender-cvs
mailing list