Files
UnrealEngineUWP/Engine/Source/Developer/MeshMergeUtilities
ben ingram d4e0953afb Refactor/cleanup surrounding material parameters.
Primary goal is to reduce amount of code duplicated across different parameter types, and reduce amount of boilerplate required to add new parameters
The main part are new types FMaterialParameterValue, and FMaterialParameterMetadata (both in MaterialTypes.h).  FMaterialParameterValue is a tagged union/variant type, that can represent any material parameter value.  FMaterialParameterMetadata contains a value, along with various editor-only fields that describe how that value is used.
Using this new type, many places that previously included separate APIs for each parameter type collapse to a single API that operates on a FMaterialParameterValue/FMaterialParameterMetadata.  Code that previously had a block copy/pasted for each parameter type can be replaced with a loop that iterates over all parameter types.
Also includes some API cleanup that should improve (editor) performance.  Previously we had APIs GetAllScalarParameters, GetAllVectorParameters, etc, which would return a list of FMaterialParameterInfos for each parameter of the given type.  Code would often query all parameters, then loop over the results and lookup each parameter value.  Now there's a new API, GetAllParametersOfType, which returns a list of all FMaterialParameterMetadata of a given type.  It's easy to just collect the values at the time we're building the list of parameters, so this saves the work of looking up each value individually.
#jira none
#rb lauren.barnes
[FYI] zousar.shaker

#ROBOMERGE-SOURCE: CL 17360722 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17360730 by ben ingram in ue5-release-engine-test branch]
2021-08-30 18:53:14 -04:00
..