Files
UnrealEngineUWP/Engine/Source/Runtime/MeshConversion/Public/MeshConversionOptions.h
lonnie li ce1fd78fa6 MeshConversion: Add flag to undo pre-transformation of vertex colors during MeshDescriptionToDynamicMesh.
Make pre-transformation of vertex colors during MeshDescription/DynamicMesh conversion on by default.
Fixed Convert_NoSharedInstances code path that was not pre-transforming vertex colors.

#rb nathan.mitchell
#jira none
#preflight 62d59b551062f2e6300c8cb8

[CL 21220600 by lonnie li in ue5-main branch]
2022-07-22 10:32:34 -04:00

42 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
struct MESHCONVERSION_API FConversionToMeshDescriptionOptions
{
public:
/** Should triangle groups be transfered to MeshDescription via custom PolyTriGroups attribute */
bool bSetPolyGroups = true;
/** Should Positions of vertices in MeshDescription be updated */
bool bUpdatePositions = true;
/** Should normals of MeshDescription be updated, if available and relevant */
bool bUpdateNormals = true;
/** Should Tangents and BiTangentSign of MeshDescription be updated, if available and relevant */
bool bUpdateTangents = false;
/** Should UVs of MeshDescription be updated, if available and relevant */
bool bUpdateUVs = false;
/** Should Vertex Colors of MeshDescription be updated, if available and relevant */
bool bUpdateVtxColors = false;
/** Should Vertex Colors of MeshDescription be transformed from SRGB to Linear */
bool bTransformVtxColorsSRGBToLinear = true;
//
// utility functions for common configuration cases
//
void SetToVertexColorsOnly()
{
bSetPolyGroups = bUpdatePositions = bUpdateNormals = bUpdateTangents = bUpdateUVs = false;
bUpdateVtxColors = true;
}
};