MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / SelectActorSync

Function SelectActorSync

Source/URLabEditor/Private/MjLevelOps.cpp:800–834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

798}
799
800bool 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
836bool AddQuickConvertSync(
837 const FString& ActorIdOrActorName,

Callers 1

HandleSelectActorFunction · 0.85

Calls 1

FindByActorIdOrNameFunction · 0.85

Tested by

no test coverage detected