You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Before: 3548 unity files Total CPU Time: 47343.578125 s Total time in Parallel executor: 494.60 seconds After: 3445 unity files Total CPU Time: 46044.671875 s Total time in Parallel executor: 468.51 seconds #jira #preflight 63336159b20e73a098b7f24f [CL 22218213 by bryan sefcik in ue5-main branch]
53 lines
1.2 KiB
C++
53 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "PropertySets/WeightMapSetProperties.h"
|
|
#include "WeightMapUtil.h"
|
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(WeightMapSetProperties)
|
|
|
|
|
|
void UWeightMapSetProperties::InitializeWeightMaps(const TArray<FName>& WeightMapNames)
|
|
{
|
|
// populate weight maps list
|
|
WeightMapsList.Add(TEXT("None"));
|
|
for (FName Name : WeightMapNames)
|
|
{
|
|
WeightMapsList.Add(Name.ToString());
|
|
}
|
|
if (WeightMapNames.Contains(WeightMap) == false) // discard restored value if it doesn't apply
|
|
{
|
|
WeightMap = FName(WeightMapsList[0]);
|
|
}
|
|
}
|
|
|
|
|
|
void UWeightMapSetProperties::InitializeFromMesh(const FMeshDescription* Mesh)
|
|
{
|
|
TArray<FName> TargetWeightMaps;
|
|
UE::WeightMaps::FindVertexWeightMaps(Mesh, TargetWeightMaps);
|
|
InitializeWeightMaps(TargetWeightMaps);
|
|
}
|
|
|
|
bool UWeightMapSetProperties::HasSelectedWeightMap() const
|
|
{
|
|
return WeightMap != FName(WeightMapsList[0]);
|
|
}
|
|
|
|
|
|
TArray<FString> UWeightMapSetProperties::GetWeightMapsFunc()
|
|
{
|
|
return WeightMapsList;
|
|
}
|
|
|
|
void UWeightMapSetProperties::SetSelectedFromWeightMapIndex(int32 Index)
|
|
{
|
|
if (Index < 0)
|
|
{
|
|
WeightMap = FName(WeightMapsList[0]);
|
|
}
|
|
else
|
|
{
|
|
WeightMap = FName(WeightMapsList[Index+1]);
|
|
}
|
|
}
|