AnimGraphInstance alt+click deletes connections without accessing transaction buffer

(Haven’t integrated to 4.14. yet)

In SGraphPin.cpp, in SGraphPin::OnPinMouseDown, there is the following code:

if (MouseEvent.IsAltDown())
{
	// Alt-Left clicking will break all existing connections to a pin
	const UEdGraphSchema* Schema = GraphPinObj->GetSchema();
	Schema->BreakPinLinks(*GraphPinObj, true);
	return FReply::Handled();
}

This deletes the connections outside the confines of an FScopedTransaction. So you can’t undo them. Also, depending on what is in the undo buffer before hand, attempting to undo the previous action may cause you to crash.

Adding an FScopedTransaction here appears to work. Is this just an oversight or is there a reason this isn’t undoable (and therefore we should clear the transaction history to prevent bad undo chains)

EDIT: Fixed a mistake in the problem description (said nodes not connections)

Hello Alex,

Can you explain what you’re doing to see this behavior? When I use Alt+Left click it will remove the connection wire between two nodes but I have not seen an instance where doing so deletes either node. When you mention adding an FScopedTransaction, are you referring to adding it to this section of code or within your own code? Let me know if there is any information you can provide to help me reproduce this behavior on my end.

Which nodes are you removing the connections between? I tried creating an animation blueprint and adding various nodes/connections between them. After using Alt+Click to remove the connections I was still able to Ctrl+Z to undo the removal and add the connection wire back. Please explain what you’re doing to produce the behavior you’re reporting.

Hey Alex,

Thank you for the screenshot, I misunderstood that you were using the transition nodes rather than nodes in the AnimGraph. I was able to reproduce the undo behavior you described and have entered a report here: Unreal Engine Issues and Bug Tracker (UE-39068) . You can track the report’s status as the issue is reviewed by our development staff. We will follow up here if this get fixed, but please be aware that this issue may not be prioritized or fixed soon.

Cheers

Doug Wilson

My mistake. I have corrected it to read:
“This deletes the CONNECTIONS outside the confines”…
You still cannot undo them.

And all I did was add:

const FScopedTransaction Transaction(NSLOCTEXT("UnrealEd", "GraphEd_BreakAllExistingConnections", "Break All Existing Pin Connections")); 

Immediately after the comment in the code above that beings “// Alt-Left clicking”

Just a regular animation blueprint?

I’ve got a locomotion section of an animgraph

Just alt-clicking on “Jump Start” to delete the connection between it and “Jump Loop”. Then it doesn’t show up in the undo buffer and I can’t undo it.

When you do this and it is undoable, what does the undo buffer describe the change as? (There must be a transaction buffer somewhere…)

We should have 4.14 integrated soon and I can double-check there, in case that’s the difference.