mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 23:12:16 +02:00
Replace some QMap occurrences with QHash
This commit is contained in:
parent
d1136c2d3e
commit
58a6ac384e
3 changed files with 7 additions and 7 deletions
|
@ -1583,7 +1583,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
|
|||
&& fileTargetNames.contains("viseme_O")
|
||||
&& fileTargetNames.contains("mouthShrugLower");
|
||||
if (blendshapeMappings.count() == 0 && likelyReadyPlayerMeFile) {
|
||||
QMap<QString, QPair<QString, float>>::const_iterator synonym
|
||||
QHash<QString, QPair<QString, float>>::const_iterator synonym
|
||||
= READYPLAYERME_BLENDSHAPES_MAP.constBegin();
|
||||
while (synonym != READYPLAYERME_BLENDSHAPES_MAP.constEnd()) {
|
||||
if (fileTargetNames.contains(synonym.key())) {
|
||||
|
|
|
@ -77,15 +77,15 @@ const char* BLENDSHAPE_NAMES[] = {
|
|||
""
|
||||
};
|
||||
|
||||
const QMap<QString, int> BLENDSHAPE_LOOKUP_MAP = [] {
|
||||
QMap<QString, int> toReturn;
|
||||
const QHash<QString, int> BLENDSHAPE_LOOKUP_MAP = [] {
|
||||
QHash<QString, int> toReturn;
|
||||
for (int i = 0; i < (int)Blendshapes::BlendshapeCount; i++) {
|
||||
toReturn[BLENDSHAPE_NAMES[i]] = i;
|
||||
}
|
||||
return toReturn;
|
||||
}();
|
||||
|
||||
const QMap<QString, QPair<QString, float>> READYPLAYERME_BLENDSHAPES_MAP = {
|
||||
const QHash<QString, QPair<QString, float>> READYPLAYERME_BLENDSHAPES_MAP = {
|
||||
// ReadyPlayerMe blendshape default mapping.
|
||||
{ "mouthOpen", { "JawOpen", 1.0f } },
|
||||
{ "eyeBlinkLeft", { "EyeBlink_L", 1.0f } },
|
||||
|
|
|
@ -12,15 +12,15 @@
|
|||
#ifndef hifi_BlendshapeConstants_h
|
||||
#define hifi_BlendshapeConstants_h
|
||||
|
||||
#include <QMap>
|
||||
#include <QHash>
|
||||
#include <QString>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
/// The names of the supported blendshapes, terminated with an empty string.
|
||||
extern const char* BLENDSHAPE_NAMES[];
|
||||
extern const QMap<QString, int> BLENDSHAPE_LOOKUP_MAP;
|
||||
extern const QMap<QString, QPair<QString, float>> READYPLAYERME_BLENDSHAPES_MAP;
|
||||
extern const QHash<QString, int> BLENDSHAPE_LOOKUP_MAP;
|
||||
extern const QHash<QString, QPair<QString, float>> READYPLAYERME_BLENDSHAPES_MAP;
|
||||
|
||||
enum class Blendshapes : int {
|
||||
EyeBlink_L = 0,
|
||||
|
|
Loading…
Reference in a new issue