| 798 | } |
| 799 | |
| 800 | bool SelectActorSync( |
| 801 | const FString& ActorIdOrActorName, |
| 802 | FString& OutActorName, |
| 803 | FString& OutError) |
| 804 | { |
| 805 | OutActorName.Empty(); |
| 806 | OutError.Empty(); |
| 807 | if (!GEditor) |
| 808 | { |
| 809 | OutError = TEXT("GEditor null"); |
| 810 | return false; |
| 811 | } |
| 812 | UWorld* World = GEditor->GetEditorWorldContext().World(); |
| 813 | if (!World) |
| 814 | { |
| 815 | OutError = TEXT("editor world unavailable"); |
| 816 | return false; |
| 817 | } |
| 818 | |
| 819 | AActor* A = FindByActorIdOrName(World, ActorIdOrActorName); |
| 820 | if (!A) |
| 821 | { |
| 822 | OutError = FString::Printf(TEXT("no actor matching '%s'"), |
| 823 | *ActorIdOrActorName); |
| 824 | return false; |
| 825 | } |
| 826 | GEditor->SelectNone(/*bNoteSelectionChange=*/false, |
| 827 | /*bDeselectBSPSurfs=*/true, |
| 828 | /*bWarnAboutManyActors=*/false); |
| 829 | GEditor->SelectActor(A, /*bInSelected=*/true, |
| 830 | /*bNotify=*/true, |
| 831 | /*bSelectEvenIfHidden=*/true); |
| 832 | OutActorName = A->GetName(); |
| 833 | return true; |
| 834 | } |
| 835 | |
| 836 | bool AddQuickConvertSync( |
| 837 | const FString& ActorIdOrActorName, |
no test coverage detected