Files
UnrealEngineUWP/Engine/Source/Editor/DetailCustomizations/Private/PointLightComponentDetails.cpp
Ben Marsh 149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00

25 lines
1.0 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "DetailCustomizationsPrivatePCH.h"
#include "PointLightComponentDetails.h"
#include "Components/LightComponentBase.h"
#define LOCTEXT_NAMESPACE "PointLightComponentDetails"
TSharedRef<IDetailCustomization> FPointLightComponentDetails::MakeInstance()
{
return MakeShareable( new FPointLightComponentDetails );
}
void FPointLightComponentDetails::CustomizeDetails( IDetailLayoutBuilder& DetailBuilder )
{
TSharedPtr<IPropertyHandle> LightIntensityProperty = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULightComponentBase, Intensity), ULightComponentBase::StaticClass());
// Inverse squared falloff point lights (the default) are in units of lumens, instead of just being a brightness scale
LightIntensityProperty->GetProperty()->SetMetaData("UIMin",TEXT("0.0f"));
LightIntensityProperty->GetProperty()->SetMetaData("UIMax",TEXT("100000.0f"));
LightIntensityProperty->GetProperty()->SetMetaData("SliderExponent",TEXT("2.0f"));
}
#undef LOCTEXT_NAMESPACE