From 77dbe7a254deddb4e456d566bb7a2a2c30267b41 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Sat, 29 Aug 2020 11:21:56 +1200 Subject: [PATCH] Rename FACESHIFT_BLENDSHAPES to BLENDSHAPE_NAMES --- interface/src/ModelPackager.cpp | 2 +- libraries/avatars-renderer/src/avatars-renderer/Head.cpp | 2 +- libraries/fbx/src/FBXSerializer.cpp | 2 +- libraries/fbx/src/FST.cpp | 2 +- libraries/fbx/src/GLTFSerializer.cpp | 2 +- libraries/shared/src/BlendshapeConstants.cpp | 4 ++-- libraries/shared/src/BlendshapeConstants.h | 6 ++++-- 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/interface/src/ModelPackager.cpp b/interface/src/ModelPackager.cpp index c145d40549..11a6bf4378 100644 --- a/interface/src/ModelPackager.cpp +++ b/interface/src/ModelPackager.cpp @@ -296,7 +296,7 @@ void ModelPackager::populateBasicMapping(QVariantHash& mapping, QString filename mapping.insert(JOINT_FIELD, joints); // If there are no blendshape mappings, and we detect that this is likely a mixamo file, - // then we can add the default mixamo to "faceshift" mappings + // then we can add the default mixamo to blendshape mappings. if (!mapping.contains(BLENDSHAPE_FIELD) && likelyMixamoFile) { QVariantHash blendshapes; blendshapes.insertMulti("BrowsD_L", QVariantList() << "BrowsDown_Left" << 1.0); diff --git a/libraries/avatars-renderer/src/avatars-renderer/Head.cpp b/libraries/avatars-renderer/src/avatars-renderer/Head.cpp index ee0543fa6b..8e6a746f55 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Head.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Head.cpp @@ -157,7 +157,7 @@ void Head::simulate(float deltaTime) { updateEyeLookAt(); } - // use data to update fake Faceshift blendshape coefficients + // Use data to update fake blendshape coefficients. if (getProceduralAnimationFlag(HeadData::AudioProceduralBlendshapeAnimation) && !getSuppressProceduralAnimationFlag(HeadData::AudioProceduralBlendshapeAnimation)) { diff --git a/libraries/fbx/src/FBXSerializer.cpp b/libraries/fbx/src/FBXSerializer.cpp index e6413e3079..9c700be607 100644 --- a/libraries/fbx/src/FBXSerializer.cpp +++ b/libraries/fbx/src/FBXSerializer.cpp @@ -421,7 +421,7 @@ HFMModel* FBXSerializer::extractHFMModel(const hifi::VariantHash& mapping, const QMultiHash blendshapeIndices; for (int i = 0;; i++) { - hifi::ByteArray blendshapeName = FACESHIFT_BLENDSHAPES[i]; + hifi::ByteArray blendshapeName = BLENDSHAPE_NAMES[i]; if (blendshapeName.isEmpty()) { break; } diff --git a/libraries/fbx/src/FST.cpp b/libraries/fbx/src/FST.cpp index b6f109c217..fd07409960 100644 --- a/libraries/fbx/src/FST.cpp +++ b/libraries/fbx/src/FST.cpp @@ -84,7 +84,7 @@ FST* FST::createFSTFromModel(const QString& fstPath, const QString& modelFilePat // If there are no blendshape mappings, and we detect that this is likely a mixamo file, - // then we can add the default mixamo to "faceshift" mappings + // then we can add the default mixamo to blendshape mappings. if (likelyMixamoFile) { QVariantHash blendshapes; blendshapes.insertMulti("BrowsD_L", QVariantList() << "BrowsDown_Left" << 1.0); diff --git a/libraries/fbx/src/GLTFSerializer.cpp b/libraries/fbx/src/GLTFSerializer.cpp index 274a1b5dc1..dcf310c6a0 100755 --- a/libraries/fbx/src/GLTFSerializer.cpp +++ b/libraries/fbx/src/GLTFSerializer.cpp @@ -1550,7 +1550,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash& QMultiHash blendshapeIndices; for (int i = 0;; ++i) { - hifi::ByteArray blendshapeName = FACESHIFT_BLENDSHAPES[i]; + hifi::ByteArray blendshapeName = BLENDSHAPE_NAMES[i]; if (blendshapeName.isEmpty()) { break; } diff --git a/libraries/shared/src/BlendshapeConstants.cpp b/libraries/shared/src/BlendshapeConstants.cpp index 83c8271340..9035b10529 100644 --- a/libraries/shared/src/BlendshapeConstants.cpp +++ b/libraries/shared/src/BlendshapeConstants.cpp @@ -11,7 +11,7 @@ #include "BlendshapeConstants.h" -const char* FACESHIFT_BLENDSHAPES[] = { +const char* BLENDSHAPE_NAMES[] = { "EyeBlink_L", "EyeBlink_R", "EyeSquint_L", @@ -80,7 +80,7 @@ const char* FACESHIFT_BLENDSHAPES[] = { const QMap BLENDSHAPE_LOOKUP_MAP = [] { QMap toReturn; for (int i = 0; i < (int)Blendshapes::BlendshapeCount; i++) { - toReturn[FACESHIFT_BLENDSHAPES[i]] = i; + toReturn[BLENDSHAPE_NAMES[i]] = i; } return toReturn; }(); diff --git a/libraries/shared/src/BlendshapeConstants.h b/libraries/shared/src/BlendshapeConstants.h index 33d02de57d..1c37892088 100644 --- a/libraries/shared/src/BlendshapeConstants.h +++ b/libraries/shared/src/BlendshapeConstants.h @@ -17,8 +17,8 @@ #include -/// The names of the blendshapes expected by Faceshift, terminated with an empty string. -extern const char* FACESHIFT_BLENDSHAPES[]; +/// The names of the supported blendshapes, terminated with an empty string. +extern const char* BLENDSHAPE_NAMES[]; extern const QMap BLENDSHAPE_LOOKUP_MAP; enum class Blendshapes : int { @@ -97,6 +97,8 @@ enum class LegacyBlendshpaes : int { LegacyBlendshapeCount }; +// Original blendshapes were per Faceshift. + // NEW in ARKit // * MouthClose // * MouthUpperUp_L