Fix UI
This commit is contained in:
@@ -12,12 +12,12 @@ DEFINE_LOG_CATEGORY_STATIC(LogMorphController, Log, All);
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr float MinMorphTargetValue = -1.0f;
|
||||
constexpr float MaxMorphTargetValue = 1.0f;
|
||||
constexpr float MorphControllerMinMorphTargetValue = -1.0f;
|
||||
constexpr float MorphControllerMaxMorphTargetValue = 1.0f;
|
||||
|
||||
float ClampMorphTargetValue(float Value)
|
||||
{
|
||||
return FMath::Clamp(Value, MinMorphTargetValue, MaxMorphTargetValue);
|
||||
return FMath::Clamp(Value, MorphControllerMinMorphTargetValue, MorphControllerMaxMorphTargetValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr float MinMorphTargetValue = -1.0f;
|
||||
constexpr float MaxMorphTargetValue = 1.0f;
|
||||
constexpr float MorphPresetMinMorphTargetValue = -1.0f;
|
||||
constexpr float MorphPresetMaxMorphTargetValue = 1.0f;
|
||||
|
||||
float EvaluateTimelineClipCurve(const FMorphTimelineClip& Clip, float Time)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ void MorphPresetRuntime::AccumulatePresetMorphValuesAtTime(
|
||||
continue;
|
||||
}
|
||||
|
||||
const float Contribution = FMath::Clamp(EvaluateClipWeight(Clip, Time) * PresetWeight, MinMorphTargetValue, MaxMorphTargetValue);
|
||||
const float Contribution = FMath::Clamp(EvaluateClipWeight(Clip, Time) * PresetWeight, MorphPresetMinMorphTargetValue, MorphPresetMaxMorphTargetValue);
|
||||
if (FMath::Abs(Contribution) < 0.001f)
|
||||
{
|
||||
continue;
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr float MinMorphTargetValue = -1.0f;
|
||||
constexpr float MaxMorphTargetValue = 1.0f;
|
||||
constexpr float MorphTargetLibraryMinMorphTargetValue = -1.0f;
|
||||
constexpr float MorphTargetLibraryMaxMorphTargetValue = 1.0f;
|
||||
}
|
||||
|
||||
TArray<FString> UMorphTargetBlueprintLibrary::GetMorphTargetNames(USkeletalMeshComponent* SkeletalMeshComponent)
|
||||
@@ -116,7 +116,7 @@ void UMorphTargetBlueprintLibrary::ApplyPresetToMeshAtTime(USkeletalMeshComponen
|
||||
|
||||
for (const auto& Pair : FinalValues)
|
||||
{
|
||||
SkeletalMeshComponent->SetMorphTarget(Pair.Key, FMath::Clamp(Pair.Value, MinMorphTargetValue, MaxMorphTargetValue), false);
|
||||
SkeletalMeshComponent->SetMorphTarget(Pair.Key, FMath::Clamp(Pair.Value, MorphTargetLibraryMinMorphTargetValue, MorphTargetLibraryMaxMorphTargetValue), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user