Files
UnrealEngineUWP/Engine/Source/Editor/UnrealEd/Private/Animation/AsyncAnimCompressionUI.cpp
matt kuhlenschmidt 30e485f0f8 Updated async task notifications to the new progress notification api and reskined a few misc notifications
#rb lauren.barnes

#ROBOMERGE-SOURCE: CL 15797475 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v783-15756269)

[CL 15807602 by matt kuhlenschmidt in ue5-main branch]
2021-03-24 16:26:43 -04:00

36 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "AsyncAnimCompressionUI.h"
#include "GlobalEditorNotification.h"
#include "Widgets/Notifications/SNotificationList.h"
#include "Animation/AnimCompressionDerivedDataPublic.h"
#include "Animation/AnimSequence.h"
/** Global notification object. */
/** Notification class for asynchronous shader compiling. */
class FAnimCompressionNotificationImpl : public FGlobalEditorProgressNotification
{
public:
FAnimCompressionNotificationImpl()
: FGlobalEditorProgressNotification(NSLOCTEXT("AsyncAnimCompression", "AnimCompressionInProgress", "Compressing Animations"))
{}
protected:
/** FGlobalEditorProgressNotification interface */
virtual int32 UpdateProgress()
{
const int32 RemainingJobs = GAsyncCompressedAnimationsTracker ? GAsyncCompressedAnimationsTracker->GetNumRemainingJobs() : 0;
if (RemainingJobs > 0)
{
FFormatNamedArguments Args;
Args.Add(TEXT("AnimsToCompress"), FText::AsNumber(RemainingJobs));
UpdateProgressMessage(FText::Format(NSLOCTEXT("AsyncAnimCompression", "AnimCompressionInProgressFormat", "Compressing Animations ({AnimsToCompress})"), Args));
}
return RemainingJobs;
}
};
FAnimCompressionNotificationImpl GAnimCompressionNotification;