Files
UnrealEngineUWP/Engine/Source/Developer/ScreenShotComparisonTools/Private/ScreenShotPlatformNode.h
kevin hamilton 6b46dd0ced Merging //depot/Partners/Zombie/UE4-iOS/...to //depot/UE4/...
Automation: Milestone 3 and fixes for milestone 2

 -Added new EditorShot command to take editor screenshots
 -Made the ExterialTool options use the dierctory picker
 -Fixed a bug with the StaticMeshEditor test if the tutorial pops up
 -StaticMeshUV test now uses async package loading
 -Added a display every Nth screenshot to the screenshot compre tab
 -Added support to disable screenshots or request full size ones
 -Changed the screenshots so they save to the game directory even if you run the frontend by itself
 -Added screenshot support for the load all maps tests

[CL 2071712 by kevin hamilton in Main branch]
2014-05-13 12:08:56 -04:00

87 lines
2.2 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
ScreenShotChangeListNode.h: Declares the FScreenShotChangeListNode class.
=============================================================================*/
#pragma once
class FScreenShotPlatformNode : public FScreenShotBaseNode
{
public:
/**
* Construct test data given a name.
*
* @param InName The Name of this test data item.
* @param InName The Name of this asset.
*/
FScreenShotPlatformNode( const FString& InName, const FString& InAssetName = "" )
: FScreenShotBaseNode( InName, InAssetName ),
DisplayEveryNthScreenshot(0)
{}
public:
// Begin IScreenShotData interface
virtual void AddScreenShotData( const FScreenShotDataItem& InScreenDataItem ) OVERRIDE
{
FString ScreenShotNumber = FString::Printf( TEXT( "CL #%d"), InScreenDataItem.ChangeListNumber );
TSharedRef<FScreenShotBaseNode> ChildNode = MakeShareable( new FScreenShotBaseNode( ScreenShotNumber, InScreenDataItem.AssetName) );
Children.Add( ChildNode );
};
virtual EScreenShotDataType::Type GetScreenNodeType() OVERRIDE
{
return EScreenShotDataType::SSDT_Platform;
};
virtual bool SetFilter( TSharedPtr< ScreenShotFilterCollection > ScreenFilter ) OVERRIDE
{
FilteredChildren.Empty();
bool bPassesFilter = ScreenFilter->PassesAllFilters( SharedThis( this ) );
if( bPassesFilter )
{
for ( int32 Index = 0; Index < Children.Num(); Index++ )
{
if( DisplayEveryNthScreenshot > 1 && Index % DisplayEveryNthScreenshot != 0 )
{
continue;
}
FilteredChildren.Add( Children[Index] );
}
}
return bPassesFilter;
};
virtual void SetDisplayEveryNthScreenshot( int32 NewLastNth ) OVERRIDE
{
DisplayEveryNthScreenshot = NewLastNth;
if( FilteredChildren.Num() > 0 )
{
FilteredChildren.Empty();
for ( int32 Index = 0; Index < Children.Num(); Index++ )
{
if( DisplayEveryNthScreenshot > 1 && Index % DisplayEveryNthScreenshot != 0 )
{
continue;
}
FilteredChildren.Add( Children[Index] );
}
}
}
// End IScreenShotData interface
private:
// If > 1 we will only show every Nth screenshot.
uint32 DisplayEveryNthScreenshot;
};