You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "StatsViewerPrivatePCH.h"
|
|
#include "StaticMeshLightingInfo.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "Editor.StatsViewer"
|
|
|
|
UStaticMeshLightingInfo::UStaticMeshLightingInfo(const class FPostConstructInitializeProperties& PCIP)
|
|
: Super(PCIP)
|
|
{
|
|
}
|
|
|
|
void UStaticMeshLightingInfo::UpdateNames()
|
|
{
|
|
if ( LevelName.Len() == 0 || StaticMeshActor.IsValid() )
|
|
{
|
|
AActor* Actor = Cast<AActor>(StaticMeshActor.Get());
|
|
ULightmappedSurfaceCollection* SurfaceCollection = Cast<ULightmappedSurfaceCollection>(StaticMeshActor.Get());
|
|
|
|
if (SurfaceCollection && SurfaceCollection->SourceModel)
|
|
{
|
|
LevelName = SurfaceCollection->SourceModel->GetOutermost()->GetName();
|
|
}
|
|
else if (Actor)
|
|
{
|
|
LevelName = Actor->GetLevel()->GetOutermost()->GetName();
|
|
}
|
|
else if (StaticMeshActor.Get())
|
|
{
|
|
LevelName = StaticMeshActor.Get()->GetOutermost()->GetName();
|
|
}
|
|
else
|
|
{
|
|
LevelName = TEXT("<None>");
|
|
}
|
|
|
|
const int32 NameIndex = LevelName.Find( TEXT("/") );
|
|
if ( NameIndex != INDEX_NONE )
|
|
{
|
|
LevelName = LevelName.RightChop( NameIndex + 1 );
|
|
}
|
|
}
|
|
|
|
if( bTextureMapping )
|
|
{
|
|
TextureMapping = LOCTEXT("LightingUsesTextureMapping", "Texture" ).ToString();
|
|
}
|
|
else
|
|
{
|
|
TextureMapping = LOCTEXT("LightingUsesVertexMapping", "Vertex" ).ToString();
|
|
}
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE |