2016-12-08 08:52:44 -05:00
|
|
|
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
#include "StatsPages/TextureStatsPage.h"
|
|
|
|
|
#include "GameFramework/Actor.h"
|
|
|
|
|
#include "Materials/MaterialInterface.h"
|
|
|
|
|
#include "Engine/Texture.h"
|
|
|
|
|
#include "Misc/App.h"
|
|
|
|
|
#include "UObject/UObjectIterator.h"
|
|
|
|
|
#include "Components/PrimitiveComponent.h"
|
|
|
|
|
#include "Engine/Texture2D.h"
|
|
|
|
|
#include "Engine/Selection.h"
|
|
|
|
|
#include "Engine/TextureCube.h"
|
|
|
|
|
#include "EngineUtils.h"
|
|
|
|
|
#include "Editor.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
#include "ReferencedAssetsUtils.h"
|
|
|
|
|
#include "AssetSelection.h"
|
|
|
|
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "Editor.StatsViewer.TextureStats"
|
|
|
|
|
|
|
|
|
|
FTextureStatsPage& FTextureStatsPage::Get()
|
|
|
|
|
{
|
|
|
|
|
static FTextureStatsPage* Instance = NULL;
|
|
|
|
|
if( Instance == NULL )
|
|
|
|
|
{
|
|
|
|
|
Instance = new FTextureStatsPage;
|
|
|
|
|
}
|
|
|
|
|
return *Instance;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Helper class to generate statistics */
|
|
|
|
|
struct TextureStatsGenerator : public FFindReferencedAssets
|
|
|
|
|
{
|
|
|
|
|
/** Textures that should be ignored when taking stats */
|
|
|
|
|
TArray<TWeakObjectPtr<UTexture>> TexturesToIgnore;
|
|
|
|
|
|
|
|
|
|
/** Map so we can track usage per-actor */
|
|
|
|
|
TMap<FString, UTextureStats*> EntryMap;
|
|
|
|
|
|
|
|
|
|
UWorld* GetWorld() const
|
|
|
|
|
{
|
|
|
|
|
return GWorld;
|
|
|
|
|
}
|
|
|
|
|
void GetObjectsForListMode( const ETextureObjectSets InObjectSet, TArray<UObject*>& OutObjectsToSearch )
|
|
|
|
|
{
|
|
|
|
|
if( InObjectSet == TextureObjectSet_SelectedActors )
|
|
|
|
|
{
|
|
|
|
|
// In this mode only get selected actors
|
2015-05-15 14:49:07 -04:00
|
|
|
for( AActor* Actor : FSelectedActorRange(GetWorld()) )
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2015-05-15 14:49:07 -04:00
|
|
|
OutObjectsToSearch.Add( Actor );
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if( InObjectSet == TextureObjectSet_SelectedMaterials )
|
|
|
|
|
{
|
|
|
|
|
TArray<FAssetData> SelectedAssets;
|
|
|
|
|
AssetSelectionUtils::GetSelectedAssets( SelectedAssets );
|
|
|
|
|
|
|
|
|
|
// In this mode only get selected materials
|
|
|
|
|
for ( auto It = SelectedAssets.CreateConstIterator(); It; ++It )
|
|
|
|
|
{
|
|
|
|
|
if ((*It).IsAssetLoaded())
|
|
|
|
|
{
|
|
|
|
|
UMaterialInterface* Material = Cast<UMaterialInterface>((*It).GetAsset());
|
|
|
|
|
if( Material )
|
|
|
|
|
{
|
|
|
|
|
OutObjectsToSearch.Add( Material );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if( InObjectSet == TextureObjectSet_CurrentStreamingLevel )
|
|
|
|
|
{
|
|
|
|
|
// In this mode get all actors in the current level
|
|
|
|
|
for (int32 ActorIdx = 0; ActorIdx < GetWorld()->GetCurrentLevel()->Actors.Num(); ++ActorIdx )
|
|
|
|
|
{
|
|
|
|
|
OutObjectsToSearch.Add( GetWorld()->GetCurrentLevel()->Actors[ActorIdx] );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if( InObjectSet == TextureObjectSet_AllStreamingLevels )
|
|
|
|
|
{
|
|
|
|
|
// In this mode get all actors in all levels
|
|
|
|
|
for( int32 LevelIdx = 0; LevelIdx < GetWorld()->GetNumLevels(); ++LevelIdx )
|
|
|
|
|
{
|
|
|
|
|
const ULevel* CurrentLevel = GetWorld()->GetLevel( LevelIdx );
|
|
|
|
|
for (int32 ActorIdx = 0; ActorIdx < CurrentLevel->Actors.Num(); ++ActorIdx )
|
|
|
|
|
{
|
|
|
|
|
OutObjectsToSearch.Add( CurrentLevel->Actors[ActorIdx] );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IsTextureValidForStats( const UTexture* Texture )
|
|
|
|
|
{
|
|
|
|
|
const bool bIsValid = Texture && // texture must exist
|
|
|
|
|
TexturesToIgnore.Find( Texture ) == INDEX_NONE && // texture is not one that should be ignored
|
|
|
|
|
( Texture->IsA( UTexture2D::StaticClass() ) || Texture->IsA( UTextureCube::StaticClass() ) ); // texture is valid texture class for stat purposes
|
|
|
|
|
|
|
|
|
|
#if 0 // @todo TextureInfoInUE4 UTextureCube::GetFace doesn't exist
|
|
|
|
|
UTextureCube* CubeTex = Cast<UTextureCube>( Texture );
|
|
|
|
|
if( CubeTex )
|
|
|
|
|
{
|
|
|
|
|
// If the passed in texture is a cube, add all faces of the cube to the ignore list since the cube will account for those
|
|
|
|
|
for( int32 FaceIdx = 0; FaceIdx < 6; ++FaceIdx )
|
|
|
|
|
{
|
|
|
|
|
TexturesToIgnore.Add( CubeTex->GetFace( FaceIdx ) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
return bIsValid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void BuildReferencingData( ETextureObjectSets InObjectSet )
|
|
|
|
|
{
|
|
|
|
|
// Don't check for BSP mats if the list mode needs something to be selected
|
|
|
|
|
if( InObjectSet != TextureObjectSet_SelectedActors && InObjectSet != TextureObjectSet_SelectedMaterials )
|
|
|
|
|
{
|
|
|
|
|
TSet<UObject*> BspMats;
|
|
|
|
|
// materials to a temp list
|
|
|
|
|
for (int32 Index = 0; Index < GetWorld()->GetModel()->Surfs.Num(); Index++)
|
|
|
|
|
{
|
|
|
|
|
// No point showing the default material
|
|
|
|
|
if (GetWorld()->GetModel()->Surfs[Index].Material != NULL)
|
|
|
|
|
{
|
|
|
|
|
BspMats.Add(GetWorld()->GetModel()->Surfs[Index].Material);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// If any BSP surfaces are selected
|
|
|
|
|
if (BspMats.Num() > 0)
|
|
|
|
|
{
|
|
|
|
|
FReferencedAssets* Referencer = new(Referencers) FReferencedAssets(GetWorld()->GetModel());
|
|
|
|
|
|
|
|
|
|
// Now copy the array
|
|
|
|
|
Referencer->AssetList = BspMats;
|
|
|
|
|
ReferenceGraph.Add(GetWorld()->GetModel(), BspMats);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// this is the maximum depth to use when searching for references
|
|
|
|
|
const int32 MaxRecursionDepth = 0;
|
|
|
|
|
|
|
|
|
|
// Mark all objects so we don't get into an endless recursion
|
|
|
|
|
for (FObjectIterator It; It; ++It)
|
|
|
|
|
{
|
|
|
|
|
// Skip the level, world, and any packages that should be ignored
|
|
|
|
|
if ( ShouldSearchForAssets(*It,IgnoreClasses,IgnorePackages,false) )
|
|
|
|
|
{
|
|
|
|
|
It->Mark(OBJECTMARK_TagExp);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
It->UnMark(OBJECTMARK_TagExp);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Get the objects to search for texture references
|
|
|
|
|
TArray< UObject* > ObjectsToSearch;
|
|
|
|
|
GetObjectsForListMode( InObjectSet, ObjectsToSearch );
|
|
|
|
|
|
|
|
|
|
TArray<UObject*> ObjectsToSkip;
|
|
|
|
|
|
|
|
|
|
for( int32 ObjIdx = 0; ObjIdx < ObjectsToSearch.Num(); ++ObjIdx )
|
|
|
|
|
{
|
|
|
|
|
UObject* CurrentObject = ObjectsToSearch[ ObjIdx ];
|
|
|
|
|
if ( !ObjectsToSkip.Contains(CurrentObject) )
|
|
|
|
|
{
|
|
|
|
|
// Create a new entry for this actor
|
|
|
|
|
FReferencedAssets* Referencer = new(Referencers) FReferencedAssets(CurrentObject);
|
|
|
|
|
|
|
|
|
|
// Add to the list of referenced assets
|
|
|
|
|
FFindAssetsArchive(CurrentObject,Referencer->AssetList,&ReferenceGraph,MaxRecursionDepth,false,false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FString GetTexturePath(const FString &FullyQualifiedPath)
|
|
|
|
|
{
|
|
|
|
|
const int32 Index = FullyQualifiedPath.Find(TEXT(".") );
|
|
|
|
|
|
|
|
|
|
if(Index == INDEX_NONE)
|
|
|
|
|
{
|
|
|
|
|
return TEXT("");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return FullyQualifiedPath.Left(Index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AddEntry( const UTexture* InTexture, const AActor* InActorUsingTexture, TArray< TWeakObjectPtr<UObject> >& OutObjects )
|
|
|
|
|
{
|
|
|
|
|
UTextureStats* Entry = NULL;
|
|
|
|
|
UTextureStats** EntryPtr = EntryMap.Find(InTexture->GetPathName());
|
|
|
|
|
if(EntryPtr == NULL)
|
|
|
|
|
{
|
2015-02-03 05:40:57 -05:00
|
|
|
Entry = NewObject<UTextureStats>();
|
2014-03-14 14:13:41 -04:00
|
|
|
Entry->AddToRoot();
|
|
|
|
|
OutObjects.Add(Entry);
|
|
|
|
|
EntryMap.Add(InTexture->GetPathName(), Entry);
|
|
|
|
|
|
|
|
|
|
Entry->Texture = InTexture;
|
|
|
|
|
Entry->Path = GetTexturePath(InTexture->GetPathName());
|
|
|
|
|
Entry->Group = (TextureGroup)InTexture->LODGroup;
|
|
|
|
|
|
|
|
|
|
Entry->CurrentKB = InTexture->CalcTextureMemorySizeEnum( TMC_ResidentMips ) / 1024.0f;
|
|
|
|
|
Entry->FullyLoadedKB = InTexture->CalcTextureMemorySizeEnum( TMC_AllMipsBiased ) / 1024.0f;
|
|
|
|
|
|
|
|
|
|
Entry->LODBias = InTexture->GetCachedLODBias();
|
|
|
|
|
|
|
|
|
|
const FTexture* Resource = InTexture->Resource;
|
|
|
|
|
if(Resource)
|
|
|
|
|
{
|
2014-04-23 18:12:58 -04:00
|
|
|
Entry->LastTimeRendered = (float)FMath::Max( FApp::GetLastTime() - Resource->LastRenderTime, 0.0 );
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const UTexture2D* Texture2D = Cast<const UTexture2D>(InTexture);
|
|
|
|
|
if( Texture2D )
|
|
|
|
|
{
|
|
|
|
|
Entry->Format = Texture2D->GetPixelFormat();
|
|
|
|
|
Entry->Type = TEXT("2D");
|
|
|
|
|
|
|
|
|
|
// Calculate in game current dimensions
|
|
|
|
|
const int32 DroppedMips = Texture2D->GetNumMips() - Texture2D->ResidentMips;
|
|
|
|
|
Entry->CurrentDim.X = Texture2D->GetSizeX() >> DroppedMips;
|
|
|
|
|
Entry->CurrentDim.Y = Texture2D->GetSizeY() >> DroppedMips;
|
|
|
|
|
|
|
|
|
|
// Calculate the max dimensions
|
|
|
|
|
Entry->MaxDim.X = Texture2D->GetSizeX() >> Entry->LODBias;
|
|
|
|
|
Entry->MaxDim.Y = Texture2D->GetSizeY() >> Entry->LODBias;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// Check if the texture is a TextureCube
|
|
|
|
|
const UTextureCube* TextureCube = Cast<const UTextureCube>(InTexture);
|
|
|
|
|
if(TextureCube)
|
|
|
|
|
{
|
|
|
|
|
Entry->Format = TextureCube->GetPixelFormat();
|
|
|
|
|
Entry->Type = TEXT("Cube");
|
|
|
|
|
|
|
|
|
|
#if 0 // @todo TextureInfoInUE4 UTextureCube::GetFace doesn't exist.
|
|
|
|
|
// Calculate in game current dimensions
|
|
|
|
|
// Use one face of the texture cube to calculate in game size
|
|
|
|
|
UTexture2D* Face = TextureCube->GetFace(0);
|
|
|
|
|
const int32 DroppedMips = Face->GetNumMips() - Face->ResidentMips;
|
|
|
|
|
Entry->CurrentDim.X = Face->GetSizeX() >> DroppedMips;
|
|
|
|
|
Entry->CurrentDim.Y = Face->GetSizeY() >> DroppedMips;
|
|
|
|
|
|
|
|
|
|
// Calculate the max dimensions
|
|
|
|
|
Entry->MaxDim.X = Face->GetSizeX() >> Entry->LODBias;
|
|
|
|
|
Entry->MaxDim.Y = Face->GetSizeY() >> Entry->LODBias;
|
|
|
|
|
#else
|
|
|
|
|
// Calculate in game current dimensions
|
|
|
|
|
Entry->CurrentDim.X = TextureCube->GetSizeX() >> Entry->LODBias;
|
|
|
|
|
Entry->CurrentDim.Y = TextureCube->GetSizeY() >> Entry->LODBias;
|
|
|
|
|
|
|
|
|
|
// Calculate the max dimensions
|
|
|
|
|
Entry->MaxDim.X = TextureCube->GetSizeX() >> Entry->LODBias;
|
|
|
|
|
Entry->MaxDim.Y = TextureCube->GetSizeY() >> Entry->LODBias;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Entry = *EntryPtr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( InActorUsingTexture != NULL && !Entry->Actors.Contains(InActorUsingTexture) )
|
|
|
|
|
{
|
|
|
|
|
Entry->Actors.Add(InActorUsingTexture);
|
|
|
|
|
Entry->NumUses++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Generate( TArray< TWeakObjectPtr<UObject> >& OutObjects )
|
|
|
|
|
{
|
|
|
|
|
for (int32 RefIndex = 0; RefIndex < Referencers.Num(); RefIndex++)
|
|
|
|
|
{
|
|
|
|
|
const TSet<UObject*> &AssetList = Referencers[RefIndex].AssetList;
|
|
|
|
|
|
|
|
|
|
// Look at each referenced asset
|
|
|
|
|
for(TSet<UObject*>::TConstIterator SetIt(AssetList); SetIt; ++SetIt)
|
|
|
|
|
{
|
|
|
|
|
const UObject* Asset = *SetIt;
|
|
|
|
|
|
|
|
|
|
const UTexture* CurrentTexture = Cast<const UTexture>(Asset);
|
|
|
|
|
|
|
|
|
|
if(IsTextureValidForStats(CurrentTexture))
|
|
|
|
|
{
|
|
|
|
|
AActor* ActorUsingTexture = Cast<AActor>(Referencers[RefIndex].Referencer);
|
|
|
|
|
|
|
|
|
|
// referenced by an actor
|
|
|
|
|
AddEntry(CurrentTexture, ActorUsingTexture, OutObjects);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const UPrimitiveComponent* ReferencedComponent = Cast<const UPrimitiveComponent>(Asset);
|
|
|
|
|
if (ReferencedComponent)
|
|
|
|
|
{
|
|
|
|
|
// If the referenced asset is a primitive component get the materials used by the component
|
|
|
|
|
TArray<UMaterialInterface*> UsedMaterials;
|
|
|
|
|
ReferencedComponent->GetUsedMaterials( UsedMaterials );
|
|
|
|
|
for(int32 MaterialIndex = 0; MaterialIndex < UsedMaterials.Num(); MaterialIndex++)
|
|
|
|
|
{
|
|
|
|
|
// For each material, find the textures used by that material and add it to the stat list
|
|
|
|
|
const UMaterialInterface* CurrentMaterial = UsedMaterials[MaterialIndex];
|
|
|
|
|
if(CurrentMaterial)
|
|
|
|
|
{
|
|
|
|
|
TArray<UTexture*> UsedTextures;
|
|
|
|
|
|
2014-10-01 09:08:51 -04:00
|
|
|
CurrentMaterial->GetUsedTextures(UsedTextures, EMaterialQualityLevel::Num, false, GMaxRHIFeatureLevel, true);
|
2014-03-14 14:13:41 -04:00
|
|
|
for(int32 TextureIndex = 0; TextureIndex < UsedTextures.Num(); TextureIndex++)
|
|
|
|
|
{
|
|
|
|
|
UTexture* CurrentUsedTexture = UsedTextures[TextureIndex];
|
|
|
|
|
|
|
|
|
|
if(IsTextureValidForStats(CurrentUsedTexture))
|
|
|
|
|
{
|
|
|
|
|
AActor* ActorUsingTexture = Cast<AActor>(Referencers[RefIndex].Referencer);
|
|
|
|
|
|
|
|
|
|
// referenced by an material
|
|
|
|
|
AddEntry(CurrentUsedTexture, ActorUsingTexture, OutObjects);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void FTextureStatsPage::Generate( TArray< TWeakObjectPtr<UObject> >& OutObjects ) const
|
|
|
|
|
{
|
|
|
|
|
TextureStatsGenerator Generator;
|
|
|
|
|
|
|
|
|
|
Generator.BuildReferencingData( (ETextureObjectSets)ObjectSetIndex );
|
|
|
|
|
Generator.Generate( OutObjects );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FTextureStatsPage::GenerateTotals( const TArray< TWeakObjectPtr<UObject> >& InObjects, TMap<FString, FText>& OutTotals ) const
|
|
|
|
|
{
|
|
|
|
|
if(InObjects.Num())
|
|
|
|
|
{
|
2015-02-03 05:40:57 -05:00
|
|
|
UTextureStats* TotalEntry = NewObject<UTextureStats>();
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
for( auto It = InObjects.CreateConstIterator(); It; ++It )
|
|
|
|
|
{
|
|
|
|
|
UTextureStats* StatsEntry = Cast<UTextureStats>( It->Get() );
|
|
|
|
|
TotalEntry->CurrentKB += StatsEntry->CurrentKB;
|
|
|
|
|
TotalEntry->FullyLoadedKB += StatsEntry->FullyLoadedKB;
|
|
|
|
|
TotalEntry->NumUses += StatsEntry->NumUses;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OutTotals.Add( TEXT("CurrentKB"), FText::AsNumber( TotalEntry->CurrentKB ) );
|
|
|
|
|
OutTotals.Add( TEXT("FullyLoadedKB"), FText::AsNumber( TotalEntry->FullyLoadedKB ) );
|
|
|
|
|
OutTotals.Add( TEXT("NumUses"), FText::AsNumber( TotalEntry->NumUses ) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FTextureStatsPage::OnEditorSelectionChanged( UObject* NewSelection, TWeakPtr< IStatsViewer > InParentStatsViewer )
|
|
|
|
|
{
|
|
|
|
|
if(InParentStatsViewer.IsValid())
|
|
|
|
|
{
|
Copying //UE4/Dev-Framework to //UE4/Dev-Main (Source: //UE4/Dev-Framework @ 2964666)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2945310 on 2016/04/15 by Jon.Nabozny
Fix UI locking Angular Rotation Offset for PhysicsConstraintComponents when the motion is for axes is Free or Locked.
#JIRA UE-29368
Change 2945490 on 2016/04/15 by Jon.Nabozny
Remove extraneous changes introduced in CL-2945310.
Change 2946706 on 2016/04/18 by James.Golding
Checkin of slice test assets
Change 2947895 on 2016/04/19 by Benn.Gallagher
PR #2292: Use ref instead of copy in FAnimNode_ModifyBone::EvaluateBoneTransforms (Contributed by MiKom)
#jira UE-29567
Change 2947944 on 2016/04/19 by Benn.Gallagher
Fixed a few extra needless bone container copies
Change 2948279 on 2016/04/19 by Marc.Audy
Add well defined Map and Set Property names
Change 2948280 on 2016/04/19 by Marc.Audy
Properly name parameters
Change 2948792 on 2016/04/19 by Marc.Audy
Remove unused ini class name settings
Change 2948917 on 2016/04/19 by Aaron.McLeran
UE-29654 FadeIn invalidates Audio Components in 4.11
Change 2949567 on 2016/04/20 by James.Golding
- Add SliceProceduralMesh utility to UKismetProceduralMeshLibrary. It will slice the ProcMeshComp with a plan, including simple collision geom, and optionally create cap geometry, and create an addition ProceduralMeshComponent for the other half
- Add support for simple collision on ProceduralMeshComponent, and added bUseComplexAsSimpleCollision to allow it to be used
- Move GeomTools.h and .cpp from Editor to Engine module, so it can be used at runtime. Also move utils into an FGeomTools namespace.
- Add GetSectionFromStaticMesh and CopyProceduralMeshFromStaticMeshComponent utilities to UKismetProceduralMeshLibrary
- Expose UStaticMesh::GetNumLODs to BP, and add BP exposed UStaticMesh:: GetNumSections function
Change 2950482 on 2016/04/20 by Aaron.McLeran
FORT-22973 SoundMix Fade Time not fading audio properly
- Bug was due to bApplyToChildren case where the FSoundClassAdjuster wasn't getting the interpolated value before calling RecursiveApplyAdjuster in the case of non-overriden sound mixes.
Change 2951102 on 2016/04/21 by Thomas.Sarkanen
Un-deprecated blueprint functions for attachment/detachment
Renamed functions to <FuncName> (Deprecated).
Hid functions in the BP context menu so new ones cant be added.
#jira UE-23216 - "Snap to Target, Keep World Scale" when attaching doesn't work properly if parent is scaled.
Change 2951173 on 2016/04/21 by James.Golding
Fix cap geom generation when more than one polygon is generated
Fix CIS warning in KismetProceduralMeshLibrary.cpp
Change 2951334 on 2016/04/21 by Osman.Tsjardiwal
Add CapMaterial param to SliceProceduralMesh util
Change 2951528 on 2016/04/21 by Marc.Audy
Fix spelling errors in comments
Change 2952933 on 2016/04/22 by Lukasz.Furman
fixed behavior tree getting stuck on instantly finished gameplay tasks
copy of CL# 2952930
Change 2953948 on 2016/04/24 by James.Golding
Put #if WITH_EDITOR back into FPoly::Triangulate to fix non-editor builds (FPoly::Finalize not available in non-editor)
Change 2954558 on 2016/04/25 by Marc.Audy
Make USceneComponent::Attach* members private and remove deprecation messages and pragmas disabling/enabling deprecation throughout SceneComponent.h/cpp
#jira UE-29038
Change 2954865 on 2016/04/25 by Aaron.McLeran
UE-29763 Use HMD audio device only in VR preview mode, not for other PIE session types.
Change 2955009 on 2016/04/25 by Zak.Middleton
#ue4 - Wrap call from UCharacterMovementComponent::PostPhysicsTickComponent() to UpdateBasedMovement() in a FScopedMovementUpdate to accumulate moves with better perf.
Change 2955878 on 2016/04/26 by Benn.Gallagher
[Epic Friday] - Added spherical constraints to anim dynamics
Change 2956380 on 2016/04/26 by Lina.Halper
PR #2298: Step interpolation for UAnimSequence (Contributed by douglaslassance)
Change 2956383 on 2016/04/26 by Lina.Halper
Fixed to match coding standard
Change 2957866 on 2016/04/27 by Zak.Middleton
#ue4 - Add max depenetration distance settings for CharacterMovementComponent. Add controls to throttle logging when character is stuck in geometry so it doesn't spam the log.
- Depenetration settings are separated based on whether overlapping a Pawn versus other geometry, and furthermore by whether the Character is a proxy or not. Simulated proxies typically should not depenetrate a large amount because that effectively ignores the server authoritative location update.
- "Stuck" logging is controlled by the console var "p.CharacterStuckWarningPeriod". Set to number of seconds between logged events, or less than zero to disable logging.
#tests QA-Surfaces multiplayer, walking in to moving objects and pawns.
Change 2957953 on 2016/04/27 by Aaron.McLeran
UE-30018 Fixing up audio component ref-counting to prevent triggering notifications when an audio component is still active after a sound finishes playing.
Change 2958011 on 2016/04/27 by Jon.Nabozny
CalcAABB wasn't properly accounting for current transform on Convex elements, causing bad results.
#JIRA UE-29525
Change 2958321 on 2016/04/27 by Lukasz.Furman
path following update pass, added flags to request result, fixed AITask stacking vs scripted/BP move requests
Change 2959506 on 2016/04/28 by Aaron.McLeran
PR #2330: Fix for ambient sounds not stopping when active and told to play again (Contributed by hgamiel)
Change 2959686 on 2016/04/28 by Marc.Audy
Correctly handle multiple viewpoints when significance is being sorted descending
Change 2959773 on 2016/04/28 by Marc.Audy
Fix shadowing warning
Change 2959785 on 2016/04/28 by Aaron.McLeran
UE-30083 Sound concatenator node doesn't progress if child nodes don't produce wave instances
Change 2960852 on 2016/04/29 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2960738
Change 2960946 on 2016/04/29 by Marc.Audy
Fix post merge compile error
Change 2962501 on 2016/05/02 by Marc.Audy
Remove interim GetMutableAttach accessors and use the variables directly now that they are private
Change 2962535 on 2016/05/02 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2962478
Change 2962578 on 2016/05/02 by Marc.Audy
Switch ObjectGraphMove to using UserFlags instead of custom move data
Change 2962651 on 2016/05/02 by Marc.Audy
VS2015 shadow variable fixes
Change 2962662 on 2016/05/02 by Lukasz.Furman
deprecated old implementation of gameplay debugger
#jira UE-30011
Change 2962919 on 2016/05/02 by Marc.Audy
VS2015 shadow variable fixes
Change 2963475 on 2016/05/02 by Mieszko.Zielinski
Made SimpleMoveToLocation/Actor not reset velocity if agent not already at goal #UE4
#jira UE-30176
Change 2964098 on 2016/05/03 by Marc.Audy
Spelling fix
Change 2964099 on 2016/05/03 by Marc.Audy
VS2015 shadow variable fixes
Change 2964156 on 2016/05/03 by Marc.Audy
VS2015 shadow variable fixes
Change 2964272 on 2016/05/03 by Marc.Audy
VS2015 Shadow Variable fixes
Change 2964395 on 2016/05/03 by Marc.Audy
VS2015 Shadow Variable Fixes
Change 2964460 on 2016/05/03 by Marc.Audy
Reschedule coolingdown tick functions during pause frames.
#jira UE-30221
Change 2964666 on 2016/05/03 by Marc.Audy
Fix shipping compile error
[CL 2964775 by Marc Audy in Main branch]
2016-05-03 15:44:33 -04:00
|
|
|
const int32 ObjSetIndex = InParentStatsViewer.Pin()->GetObjectSetIndex();
|
|
|
|
|
if( ObjSetIndex == TextureObjectSet_SelectedActors || ObjSetIndex == TextureObjectSet_SelectedMaterials )
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
InParentStatsViewer.Pin()->Refresh();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FTextureStatsPage::OnEditorNewCurrentLevel( TWeakPtr< IStatsViewer > InParentStatsViewer )
|
|
|
|
|
{
|
|
|
|
|
if(InParentStatsViewer.IsValid())
|
|
|
|
|
{
|
Copying //UE4/Dev-Framework to //UE4/Dev-Main (Source: //UE4/Dev-Framework @ 2964666)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2945310 on 2016/04/15 by Jon.Nabozny
Fix UI locking Angular Rotation Offset for PhysicsConstraintComponents when the motion is for axes is Free or Locked.
#JIRA UE-29368
Change 2945490 on 2016/04/15 by Jon.Nabozny
Remove extraneous changes introduced in CL-2945310.
Change 2946706 on 2016/04/18 by James.Golding
Checkin of slice test assets
Change 2947895 on 2016/04/19 by Benn.Gallagher
PR #2292: Use ref instead of copy in FAnimNode_ModifyBone::EvaluateBoneTransforms (Contributed by MiKom)
#jira UE-29567
Change 2947944 on 2016/04/19 by Benn.Gallagher
Fixed a few extra needless bone container copies
Change 2948279 on 2016/04/19 by Marc.Audy
Add well defined Map and Set Property names
Change 2948280 on 2016/04/19 by Marc.Audy
Properly name parameters
Change 2948792 on 2016/04/19 by Marc.Audy
Remove unused ini class name settings
Change 2948917 on 2016/04/19 by Aaron.McLeran
UE-29654 FadeIn invalidates Audio Components in 4.11
Change 2949567 on 2016/04/20 by James.Golding
- Add SliceProceduralMesh utility to UKismetProceduralMeshLibrary. It will slice the ProcMeshComp with a plan, including simple collision geom, and optionally create cap geometry, and create an addition ProceduralMeshComponent for the other half
- Add support for simple collision on ProceduralMeshComponent, and added bUseComplexAsSimpleCollision to allow it to be used
- Move GeomTools.h and .cpp from Editor to Engine module, so it can be used at runtime. Also move utils into an FGeomTools namespace.
- Add GetSectionFromStaticMesh and CopyProceduralMeshFromStaticMeshComponent utilities to UKismetProceduralMeshLibrary
- Expose UStaticMesh::GetNumLODs to BP, and add BP exposed UStaticMesh:: GetNumSections function
Change 2950482 on 2016/04/20 by Aaron.McLeran
FORT-22973 SoundMix Fade Time not fading audio properly
- Bug was due to bApplyToChildren case where the FSoundClassAdjuster wasn't getting the interpolated value before calling RecursiveApplyAdjuster in the case of non-overriden sound mixes.
Change 2951102 on 2016/04/21 by Thomas.Sarkanen
Un-deprecated blueprint functions for attachment/detachment
Renamed functions to <FuncName> (Deprecated).
Hid functions in the BP context menu so new ones cant be added.
#jira UE-23216 - "Snap to Target, Keep World Scale" when attaching doesn't work properly if parent is scaled.
Change 2951173 on 2016/04/21 by James.Golding
Fix cap geom generation when more than one polygon is generated
Fix CIS warning in KismetProceduralMeshLibrary.cpp
Change 2951334 on 2016/04/21 by Osman.Tsjardiwal
Add CapMaterial param to SliceProceduralMesh util
Change 2951528 on 2016/04/21 by Marc.Audy
Fix spelling errors in comments
Change 2952933 on 2016/04/22 by Lukasz.Furman
fixed behavior tree getting stuck on instantly finished gameplay tasks
copy of CL# 2952930
Change 2953948 on 2016/04/24 by James.Golding
Put #if WITH_EDITOR back into FPoly::Triangulate to fix non-editor builds (FPoly::Finalize not available in non-editor)
Change 2954558 on 2016/04/25 by Marc.Audy
Make USceneComponent::Attach* members private and remove deprecation messages and pragmas disabling/enabling deprecation throughout SceneComponent.h/cpp
#jira UE-29038
Change 2954865 on 2016/04/25 by Aaron.McLeran
UE-29763 Use HMD audio device only in VR preview mode, not for other PIE session types.
Change 2955009 on 2016/04/25 by Zak.Middleton
#ue4 - Wrap call from UCharacterMovementComponent::PostPhysicsTickComponent() to UpdateBasedMovement() in a FScopedMovementUpdate to accumulate moves with better perf.
Change 2955878 on 2016/04/26 by Benn.Gallagher
[Epic Friday] - Added spherical constraints to anim dynamics
Change 2956380 on 2016/04/26 by Lina.Halper
PR #2298: Step interpolation for UAnimSequence (Contributed by douglaslassance)
Change 2956383 on 2016/04/26 by Lina.Halper
Fixed to match coding standard
Change 2957866 on 2016/04/27 by Zak.Middleton
#ue4 - Add max depenetration distance settings for CharacterMovementComponent. Add controls to throttle logging when character is stuck in geometry so it doesn't spam the log.
- Depenetration settings are separated based on whether overlapping a Pawn versus other geometry, and furthermore by whether the Character is a proxy or not. Simulated proxies typically should not depenetrate a large amount because that effectively ignores the server authoritative location update.
- "Stuck" logging is controlled by the console var "p.CharacterStuckWarningPeriod". Set to number of seconds between logged events, or less than zero to disable logging.
#tests QA-Surfaces multiplayer, walking in to moving objects and pawns.
Change 2957953 on 2016/04/27 by Aaron.McLeran
UE-30018 Fixing up audio component ref-counting to prevent triggering notifications when an audio component is still active after a sound finishes playing.
Change 2958011 on 2016/04/27 by Jon.Nabozny
CalcAABB wasn't properly accounting for current transform on Convex elements, causing bad results.
#JIRA UE-29525
Change 2958321 on 2016/04/27 by Lukasz.Furman
path following update pass, added flags to request result, fixed AITask stacking vs scripted/BP move requests
Change 2959506 on 2016/04/28 by Aaron.McLeran
PR #2330: Fix for ambient sounds not stopping when active and told to play again (Contributed by hgamiel)
Change 2959686 on 2016/04/28 by Marc.Audy
Correctly handle multiple viewpoints when significance is being sorted descending
Change 2959773 on 2016/04/28 by Marc.Audy
Fix shadowing warning
Change 2959785 on 2016/04/28 by Aaron.McLeran
UE-30083 Sound concatenator node doesn't progress if child nodes don't produce wave instances
Change 2960852 on 2016/04/29 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2960738
Change 2960946 on 2016/04/29 by Marc.Audy
Fix post merge compile error
Change 2962501 on 2016/05/02 by Marc.Audy
Remove interim GetMutableAttach accessors and use the variables directly now that they are private
Change 2962535 on 2016/05/02 by Marc.Audy
Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 2962478
Change 2962578 on 2016/05/02 by Marc.Audy
Switch ObjectGraphMove to using UserFlags instead of custom move data
Change 2962651 on 2016/05/02 by Marc.Audy
VS2015 shadow variable fixes
Change 2962662 on 2016/05/02 by Lukasz.Furman
deprecated old implementation of gameplay debugger
#jira UE-30011
Change 2962919 on 2016/05/02 by Marc.Audy
VS2015 shadow variable fixes
Change 2963475 on 2016/05/02 by Mieszko.Zielinski
Made SimpleMoveToLocation/Actor not reset velocity if agent not already at goal #UE4
#jira UE-30176
Change 2964098 on 2016/05/03 by Marc.Audy
Spelling fix
Change 2964099 on 2016/05/03 by Marc.Audy
VS2015 shadow variable fixes
Change 2964156 on 2016/05/03 by Marc.Audy
VS2015 shadow variable fixes
Change 2964272 on 2016/05/03 by Marc.Audy
VS2015 Shadow Variable fixes
Change 2964395 on 2016/05/03 by Marc.Audy
VS2015 Shadow Variable Fixes
Change 2964460 on 2016/05/03 by Marc.Audy
Reschedule coolingdown tick functions during pause frames.
#jira UE-30221
Change 2964666 on 2016/05/03 by Marc.Audy
Fix shipping compile error
[CL 2964775 by Marc Audy in Main branch]
2016-05-03 15:44:33 -04:00
|
|
|
const int32 ObjSetIndex = InParentStatsViewer.Pin()->GetObjectSetIndex();
|
|
|
|
|
if( ObjSetIndex == TextureObjectSet_CurrentStreamingLevel )
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
InParentStatsViewer.Pin()->Refresh();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FTextureStatsPage::OnShow( TWeakPtr< IStatsViewer > InParentStatsViewer )
|
|
|
|
|
{
|
|
|
|
|
// register delegates for scene changes we are interested in
|
|
|
|
|
USelection::SelectionChangedEvent.AddRaw(this, &FTextureStatsPage::OnEditorSelectionChanged, InParentStatsViewer);
|
|
|
|
|
FEditorDelegates::NewCurrentLevel.AddRaw(this, &FTextureStatsPage::OnEditorNewCurrentLevel, InParentStatsViewer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FTextureStatsPage::OnHide()
|
|
|
|
|
{
|
|
|
|
|
// unregister delegates
|
|
|
|
|
USelection::SelectionChangedEvent.RemoveAll(this);
|
|
|
|
|
FEditorDelegates::NewCurrentLevel.RemoveAll(this);
|
|
|
|
|
}
|
|
|
|
|
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
#undef LOCTEXT_NAMESPACE
|