Sequencer: Stuck undo buffer when using AutoKey "Can't Undo while 'SetKey Value' is in progress"

This question was created in reference to: [Sequencer: Stuck undo buffer when using AutoKey "Can’t Undo while ‘SetKey Value’ is in [Content removed]

Hello,

Unfortunately our cinematics team is reporting that they are running into this issue again.

As far as they can tell, the difference is that they started using Control Rigs more, it’s unclear if the issue happens when using the gizmos or only when using the sliders.

When using the slider we do get a UI bug that seems to trigger the issue, when sliding the UI might scroll down which breaks the interaction with the slider. Also, the UI often refreshes, also breaking the interaction with the slider.

Finally, I don’t understand why but “Local” is always highlighted.

[Image Removed]

Thanks,

Benjamin

Hello Benjamin,

This issue has come up a few times internally as well and we’re still trying to nail down the root cause. I’ve seen it happen often when an actor has an Animation Track and a Control Rig Track and possibly when auto save kicks in. That’s just a guess though. If you have any further reproducible steps, I’d love to know.

I saw in your previous post that you added a hack in OnBeginSliderMovement. Do you still have that in your codebase and users are still reporting the issue?

Perhaps you could modify it like this to include the end transaction:

void OnBeginSliderMovement() { if (GEditor->IsTransactionActive()) { GEditor->EndTransaction(); }

Another possible workaround is to add this:

`void OnValueCommitted(NumericType Value, ETextCommit::Type CommitInfo)
{
if (CommitInfo == ETextCommit::OnEnter)
{
const FScopedTransaction Transaction( LOCTEXT(“SetNumericKey”, “Set Key Value”) );
KeyEditor->SetValueWithNotify(Value, EMovieSceneDataChangeType::TrackValueChangedRefreshImmediately);
}

else if (CommitInfo == ETextCommit::OnUserMovedFocus)
{
if (GEditor->IsTransactionActive())
{
GEditor->EndTransaction();
}
}
}`

Please let me know if you any of those help. For tracking purposes, I’ve made this bug publicly visible, but it will take a few days for it to actually be visible: Unreal Engine Issues and Bug Tracker (UE\-282772)

Ok thanks for the information. We’ll keep digging on our end and hopefully find the root cause for the transaction being left open.

Hello Max,

We still have that engine change. I did try modifying it to the workarounds that you suggested but that didn’t work.

I tried the following change which so far seems promising.

`bool bHasTransaction = false; // engine change

// BEGIN engine change
~SNumericKeyEditorWidget()
{
if (bHasTransaction && GEditor->IsTransactionActive())
{
GEditor->EndTransaction();
}
}
// END engine change

void OnBeginSliderMovement()
{
if (GEditor->IsTransactionActive())
{
GEditor->EndTransaction();
}
bHasTransaction = true; // engine change
GEditor->BeginTransaction(LOCTEXT(“SetNumericKey”, “Set Key Value”));
}

void OnEndSliderMovement(NumericType Value)
{
if (GEditor->IsTransactionActive())
{
KeyEditor->SetValue(Value);
GEditor->EndTransaction();

bHasTransaction = false; // engine change
}
}` Please also find attached a video of the UI glitch that I believe might be causing this.

Cheers,