You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Changed FEdMode widget property display code to prefer a selected component - Removed some duplicated code in various places in FEdMode - Changed the widget diamond for transform properties to draw in the correct orientation - Cleaned up various GEditor references that had crept back into FEdMode - Added FEditorModeTools::GetSelectedComponents - Initialized some unused variables in FEditorModeTools - Some minor coding standards tweaks, implicit int to bools, etc... [UE-12942] [UE-12943] [CL 2515154 by Michael Noland in Main branch]
62 lines
1.4 KiB
C++
62 lines
1.4 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "UnrealEd.h"
|
|
#include "AssetEditorModeManager.h"
|
|
#include "PreviewScene.h"
|
|
#include "Engine/Selection.h"
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// FAssetEditorModeManager
|
|
|
|
FAssetEditorModeManager::FAssetEditorModeManager()
|
|
: PreviewScene(nullptr)
|
|
{
|
|
ActorSet = NewObject<USelection>();
|
|
ActorSet->SetFlags(RF_Transactional);
|
|
ActorSet->AddToRoot();
|
|
|
|
ObjectSet = NewObject<USelection>();
|
|
ObjectSet->SetFlags(RF_Transactional);
|
|
ObjectSet->AddToRoot();
|
|
|
|
ComponentSet = NewObject<USelection>();
|
|
ComponentSet->SetFlags(RF_Transactional);
|
|
ComponentSet->AddToRoot();
|
|
}
|
|
|
|
FAssetEditorModeManager::~FAssetEditorModeManager()
|
|
{
|
|
ActorSet->RemoveFromRoot();
|
|
ActorSet = nullptr;
|
|
ObjectSet->RemoveFromRoot();
|
|
ObjectSet = nullptr;
|
|
ComponentSet->RemoveFromRoot();
|
|
ComponentSet = nullptr;
|
|
}
|
|
|
|
USelection* FAssetEditorModeManager::GetSelectedActors() const
|
|
{
|
|
return ActorSet;
|
|
}
|
|
|
|
USelection* FAssetEditorModeManager::GetSelectedObjects() const
|
|
{
|
|
return ObjectSet;
|
|
}
|
|
|
|
USelection* FAssetEditorModeManager::GetSelectedComponents() const
|
|
{
|
|
return ComponentSet;
|
|
}
|
|
|
|
UWorld* FAssetEditorModeManager::GetWorld() const
|
|
{
|
|
return (PreviewScene != nullptr) ? PreviewScene->GetWorld() : GEditor->GetEditorWorldContext().World();
|
|
}
|
|
|
|
void FAssetEditorModeManager::SetPreviewScene(class FPreviewScene* NewPreviewScene)
|
|
{
|
|
PreviewScene = NewPreviewScene;
|
|
}
|
|
|