Files
UnrealEngineUWP/Engine/Source/Editor/DetailCustomizations/Private/SkeletalMeshDetails.cpp
graham wihlidal e09023edc0 [Nanite-Skinning] Cleaned up NaniteSettings filtering
#fyi brian.karis, rune.stubbe, jamie.hayes, kiaran.ritchie, halfdan.ingvarsson
#jira UE-210921

[CL 32783113 by graham wihlidal in ue5-main branch]
2024-04-06 03:05:00 -04:00

33 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "SkeletalMeshDetails.h"
#include "Containers/Array.h"
#include "DetailLayoutBuilder.h"
#include "Engine/SkeletalMesh.h"
#include "HAL/PlatformMath.h"
#include "IMeshReductionManagerModule.h"
#include "Misc/AssertionMacros.h"
#include "Modules/ModuleManager.h"
#include "PropertyEditorModule.h"
#include "PropertyHandle.h"
#include "UObject/NameTypes.h"
#define LOCTEXT_NAMESPACE "SkeletalMeshDetails"
void FSkeletalMeshDetails::CustomizeDetails(IDetailLayoutBuilder& LayoutBuilder)
{
static const auto AllowSkinnedMeshes = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.Nanite.AllowSkinnedMeshes"));
static const bool bAllowSkinnedMeshes = (AllowSkinnedMeshes && AllowSkinnedMeshes->GetValueOnAnyThread() != 0);
if (!bAllowSkinnedMeshes)
{
TSharedRef<IPropertyHandle> SettingsHandle = LayoutBuilder.GetProperty(FName("NaniteSettings"));
LayoutBuilder.HideProperty(SettingsHandle);
}
}
TSharedRef<IDetailCustomization> FSkeletalMeshDetails::MakeInstance()
{
return MakeShareable(new FSkeletalMeshDetails);
}
#undef LOCTEXT_NAMESPACE