You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Bitfields were previously not supported because there was no exposed way of determining how an FBoolProperty is mapped in memory. Using fast pointer offsets would have previously caused us to always stomp a full byte over the address. Since we now support meta-data on property components (which is already used by colors and vectors), we can use the FBoolProperty when resolving the property to detect the bitoffset if FBoolProperty::IsNativeBool is false. (see usage of CountTrailingZeros64 inside FBoolHandler) For my test this pulls down the cost of assigning boolean flags for PostProcessingOverrides from 15us to 1.7us. Other miscellaneous changes included: - Added a way for traits to tell the component handlers that they are not composite property types. This causes them to use direct property setters rather than requiring a composite temporary, and prevents the handler from instantiating partial property setter code. - Moved custom accessor functions into their own file. Added one for ULightComponent::VolumetricScatteringIntensity. #rb Ludovic.Chabant, Max.Chen #preflight 647907a6e319748a835fbd06 [CL 25760044 by andrew rodham in ue5-main branch]
59 lines
1.8 KiB
C++
59 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "EntitySystem/MovieScenePropertyBinding.h"
|
|
#include "UObject/NameTypes.h"
|
|
#include "Misc/StringBuilder.h"
|
|
#include "Containers/StringView.h"
|
|
|
|
FMovieScenePropertyBinding::FMovieScenePropertyBinding(FName InPropertyName, const FString& InPropertyPath)
|
|
: PropertyName(InPropertyName), PropertyPath(*InPropertyPath)
|
|
{
|
|
bCanUseClassLookup = !(InPropertyPath.Contains(TEXT("/")) || InPropertyPath.Contains(TEXT("\\")) || InPropertyPath.Contains(TEXT("[")));
|
|
}
|
|
|
|
FMovieScenePropertyBinding FMovieScenePropertyBinding::FromPath(const FString& InPropertyPath)
|
|
{
|
|
FName PropertyName;
|
|
|
|
int32 NamePos = INDEX_NONE;
|
|
if (InPropertyPath.FindLastChar('.', NamePos) || InPropertyPath.FindLastChar('/', NamePos) || InPropertyPath.FindLastChar('\\', NamePos))
|
|
{
|
|
PropertyName = FName(FStringView(*InPropertyPath + NamePos, InPropertyPath.Len() - NamePos));
|
|
}
|
|
else
|
|
{
|
|
PropertyName = *InPropertyPath;
|
|
}
|
|
return FMovieScenePropertyBinding(PropertyName, InPropertyPath);
|
|
}
|
|
|
|
#if WITH_EDITORONLY_DATA
|
|
void FMovieScenePropertyBinding::PostSerialize(const FArchive& Ar)
|
|
{
|
|
if (Ar.IsLoading())
|
|
{
|
|
const FNameEntry* NameEntry = PropertyPath.GetComparisonNameEntry();
|
|
if (NameEntry)
|
|
{
|
|
if (NameEntry->IsWide())
|
|
{
|
|
TWideStringBuilder<128> Path;
|
|
NameEntry->AppendNameToString(Path);
|
|
TStringView<WIDECHAR> PathView = Path.ToView();
|
|
|
|
int Unused = 0;
|
|
bCanUseClassLookup = !(PathView.FindChar('/', Unused) || PathView.FindChar('\\', Unused) || PathView.FindChar('[', Unused));
|
|
}
|
|
else
|
|
{
|
|
TAnsiStringBuilder<128> Path;
|
|
NameEntry->AppendAnsiNameToString(Path);
|
|
TStringView<ANSICHAR> PathView = Path.ToView();
|
|
|
|
int Unused = 0;
|
|
bCanUseClassLookup = !(PathView.FindChar('/', Unused) || PathView.FindChar('\\', Unused) || PathView.FindChar('[', Unused));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endif |