Files
jimmy andrews 143d4cd0c4 add generated light map option to the modeling tools mesh creation settings + make the settings more consistently used by default
also, when creating a static mesh with lightmap enabled via modeling components, also set the lightmap channel and resolution to match the build settings values, to better match the importer results

#jira UE-143961
#8929
#rb ryan.schmidt
#preflight 6406adbf0c7df1967f461e2d

[CL 24542092 by jimmy andrews in ue5-main branch]
2023-03-07 12:04:54 -05:00

47 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "ModelingComponentsSettings.h"
#include "ModelingObjectsCreationAPI.h"
#include UE_INLINE_GENERATED_CPP_BY_NAME(ModelingComponentsSettings)
#define LOCTEXT_NAMESPACE "ModelingComponentsSettings"
#if WITH_EDITOR
FText UModelingComponentsSettings::GetSectionText() const
{
return LOCTEXT("ModelingComponentsProjectSettingsName", "Modeling Mode Tools");
}
FText UModelingComponentsSettings::GetSectionDescription() const
{
return LOCTEXT("ModelingComponentsProjectSettingsDescription", "Configure Tool-level Settings for the Modeling Tools Editor Mode plugin");
}
FText UModelingComponentsEditorSettings::GetSectionText() const
{
return LOCTEXT("ModelingComponentsEditorSettingsName", "Modeling Mode Tools");
}
FText UModelingComponentsEditorSettings::GetSectionDescription() const
{
return LOCTEXT("ModelingComponentsEditorSettingsDescription", "Configure Tool-level Settings for the Modeling Tools Editor Mode plugin");
}
#endif
void UModelingComponentsSettings::ApplyDefaultsToCreateMeshObjectParams(FCreateMeshObjectParams& Params)
{
const UModelingComponentsSettings* Settings = GetDefault<UModelingComponentsSettings>();
if (Settings)
{
Params.bEnableCollision = Settings->bEnableCollision;
Params.CollisionMode = Settings->CollisionMode;
Params.bGenerateLightmapUVs = Settings->bGenerateLightmapUVs;
Params.bEnableRaytracingSupport = Settings->bEnableRayTracing;
}
}
#undef LOCTEXT_NAMESPACE