FMovieSceneFloatChannel::OnKeyAdded is not triggered when adding a key in the Sequencer

Hello Epic Support,

Currently writing an update a custom UMovieSceneSection, I stumbled on an issue with the FMovieSceneChannel::OnKeyAddedEvent. It appears that the delegate is not called consistently depending on the way the keys are added to the channel. TMovieSceneChannelData<ValueType>::AddKey() seems to broadcast it properly but any other way doesn’t. This include the way Sequencer adds keys : TMovieSceneCurveChannelImpl<ChannelType>::AddKeyToChannel() which means that the main way keys are added by users to an FMovieSceneChannel does not broadcast the associated delegate, which causes problems in some of our intended workflows.

I patched the problem locally by broadcasting the delegate at various points of TMovieSceneCurveChannelImpl. However, it appears that :

  • There are other ways keys could be added to a channel without broadcasting OnKeyAddedEvent
  • Despite being broadcasted properly by the sequencer, the two other FMovieSceneChannel delegates OnKeyMovedEvent and OnKeyDeletedEvent could also be bypassed by some code paths

Would it be possible to make the usage of these delegates more consistent and reliable, please ?

Thank you,

Thomas

[Attachment Removed]

Steps to Reproduce
Bind a callback to the OnKeyAddedEvent() of any float channel of a MovieSceneSection. Add a key on this channel through the sequencer and notice your callback isn’t called.

[Attachment Removed]

Hey there,

Thanks for raising this. You’re right that there are probably areas where this isn’t fully addressed. I’ve chatted with the team about it, and there is some higher-priority work ahead of them for a bit that would prevent them from addressing this for quite a while, but if you have things addressed and want to submit a PR, we can get it considered.

Dustin

[Attachment Removed]