Support pose watch when debugging parent or linked anim blueprints. Also prevent toggling pose watch from child anim bps

#jira UE-199935
#rb lucas.dower, Thomas.Sarkanen

[CL 29727618 by euan carmichael in ue5-main branch]
This commit is contained in:
euan carmichael
2023-11-14 17:35:49 -05:00
parent 5b7bc5ac74
commit dc35d099de
2 changed files with 27 additions and 11 deletions
@@ -880,6 +880,12 @@ bool FAnimationBlueprintEditor::CanTogglePoseWatch()
const FGraphPanelSelectionSet SelectedNodes = GetSelectedNodes();
UAnimBlueprint* AnimBP = GetAnimBlueprint();
// Can't add pose watch from a child anim bp
if (UAnimBlueprint::FindRootAnimBlueprint(AnimBP))
{
return false;
}
for (FGraphPanelSelectionSet::TConstIterator NodeIt(SelectedNodes); NodeIt; ++NodeIt)
{
if (UAnimGraphNode_Base* SelectedNode = Cast<UAnimGraphNode_Base>(*NodeIt))
@@ -920,6 +926,12 @@ void FAnimationBlueprintEditor::OnTogglePoseWatch()
const FGraphPanelSelectionSet SelectedNodes = GetSelectedNodes();
UAnimBlueprint* AnimBP = GetAnimBlueprint();
// Can't toggle pose watch from a child anim bp
if (UAnimBlueprint::FindRootAnimBlueprint(AnimBP))
{
return;
}
for (FGraphPanelSelectionSet::TConstIterator NodeIt(SelectedNodes); NodeIt; ++NodeIt)
{
if (UAnimGraphNode_Base* SelectedNode = Cast<UAnimGraphNode_Base>(*NodeIt))