Bugfix: Inserting keyframes from the buttons now ensures that the Graph Editor is updated in the process...
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user