| 1545 | } |
| 1546 | |
| 1547 | void SFlowGraphEditor::FocusViewport() const |
| 1548 | { |
| 1549 | // Iterator used but should only contain one node |
| 1550 | for (const UFlowGraphNode* SelectedNode : GetSelectedFlowNodes()) |
| 1551 | { |
| 1552 | const UFlowNode* FlowNode = Cast<UFlowNode>(SelectedNode->GetFlowNodeBase()); |
| 1553 | if (UFlowNode* InspectedInstance = FlowNode->GetInspectedInstance()) |
| 1554 | { |
| 1555 | if (AActor* ActorToFocus = InspectedInstance->GetActorToFocus()) |
| 1556 | { |
| 1557 | GEditor->SelectNone(false, false, false); |
| 1558 | GEditor->SelectActor(ActorToFocus, true, true, true); |
| 1559 | GEditor->NoteSelectionChange(); |
| 1560 | |
| 1561 | GEditor->MoveViewportCamerasToActor(*ActorToFocus, false); |
| 1562 | |
| 1563 | const FLevelEditorModule& LevelEditorModule = FModuleManager::LoadModuleChecked<FLevelEditorModule>("LevelEditor"); |
| 1564 | const TSharedPtr<SDockTab> LevelEditorTab = LevelEditorModule.GetLevelEditorInstanceTab().Pin(); |
| 1565 | if (LevelEditorTab.IsValid()) |
| 1566 | { |
| 1567 | LevelEditorTab->DrawAttention(); |
| 1568 | } |
| 1569 | } |
| 1570 | } |
| 1571 | |
| 1572 | return; |
| 1573 | } |
| 1574 | } |
| 1575 | |
| 1576 | bool SFlowGraphEditor::CanFocusViewport() const |
| 1577 | { |
nothing calls this directly
no test coverage detected