void FSequencer::SetKey() { USelection* CurrentSelection = GEditor->GetSelectedActors(); TArray<UObject*> SelectedActors; CurrentSelection->GetSelectedObjects( AActor::StaticClass(), SelectedActors ); for (TArray<UObject*>::TIterator It(SelectedActors); It; ++It) { // @todo Handle case of actors which aren't in sequencer yet FGuid ObjectGuid = GetHandleToObject(*It); for ( auto& TrackEditor : TrackEditors ) { // @todo Handle this director track business better if (TrackEditor != DirectorTrackEditor.Pin()) { TrackEditor->AddKey(ObjectGuid); } } } }
void ULiveEditorKismetLibrary::GetAllSelectedEditorObjects( UClass *OfClass, TArray<UObject*> &SelectedObjects ) { USelection *Selection = GEditor->GetSelectedActors(); check(Selection != NULL); Selection->GetSelectedObjects( OfClass, SelectedObjects); }