Animation: send notifier when keyframe is inserted
`<some_id>.keyframe_insert()` now sends a notifier that animation data
was changed, so that animation-related editors can properly refresh.
Since this function is quite high-level (if necessary it creates the
Action and FCurves), I thought this would be a suitable location for the
notifier. If high keyframing speed is required, it is still recommended
to use `FCurveKeyframePoints.insert(options={'FAST'})` instead.
This commit is contained in:
@@ -401,6 +401,10 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (result) {
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
|
||||
}
|
||||
|
||||
return PyBool_FromLong(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user