Files
UnrealEngineUWP/Engine/Source/Editor/MeshPaint/Private/MeshPaintAdapterFactory.cpp
ryan durand 627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00

48 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MeshPaintAdapterFactory.h"
#include "IMeshPaintGeometryAdapterFactory.h"
TArray<TSharedPtr<class IMeshPaintGeometryAdapterFactory>> FMeshPaintAdapterFactory::FactoryList;
TSharedPtr<class IMeshPaintGeometryAdapter> FMeshPaintAdapterFactory::CreateAdapterForMesh(UMeshComponent* InComponent, int32 InPaintingMeshLODIndex)
{
TSharedPtr<IMeshPaintGeometryAdapter> Result;
for (const auto& Factory : FactoryList)
{
Result = Factory->Construct(InComponent, InPaintingMeshLODIndex);
if (Result.IsValid())
{
break;
}
}
return Result;
}
void FMeshPaintAdapterFactory::InitializeAdapterGlobals()
{
for (const auto& Factory : FactoryList)
{
Factory->InitializeAdapterGlobals();
}
}
void FMeshPaintAdapterFactory::AddReferencedObjectsGlobals(FReferenceCollector& Collector)
{
for (const auto& Factory : FactoryList)
{
Factory->AddReferencedObjectsGlobals(Collector);
}
}
void FMeshPaintAdapterFactory::CleanupGlobals()
{
for (const auto& Factory : FactoryList)
{
Factory->CleanupGlobals();
}
}