Find the best matching blend shape for each facial expression based on their names.
Auto generation idea is to tokenize expression enum strings and blend shape name strings and find matching tokens We quantify the quality of the match by the total number of characters in the matching tokens We require at least a total of more than 2 characters to match, to avoid matching just L/R LB/RB etc. A better technique might be to use Levenshtein distance to match the tokens to allow some typos while still being loose on order of tokens
ParametersskinnedMeshThe mesh to find a mapping for.
blendShapeNamesArray of blend shape names
faceExpressionsArray of FaceExpression id for mapping to them
allowDuplicateMappingWhether to allow duplicate mapping or not
ReturnsReturns an array of
OVRFaceExpressions.FaceExpression of the same length as the number of blendshapes on the skinnedMesh with each element identifying the closest found match